| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 } else { | 3282 } else { |
| 3283 __ JumpIfNotSmi(rax, &check_heap_number); | 3283 __ JumpIfNotSmi(rax, &check_heap_number); |
| 3284 } | 3284 } |
| 3285 // No more branches to slow case on this path. Key and receiver not needed. | 3285 // No more branches to slow case on this path. Key and receiver not needed. |
| 3286 __ SmiToInteger32(rdx, rax); | 3286 __ SmiToInteger32(rdx, rax); |
| 3287 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset)); | 3287 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset)); |
| 3288 // rbx: base pointer of external storage | 3288 // rbx: base pointer of external storage |
| 3289 switch (array_type) { | 3289 switch (array_type) { |
| 3290 case kExternalPixelArray: | 3290 case kExternalPixelArray: |
| 3291 { // Clamp the value to [0..255]. | 3291 { // Clamp the value to [0..255]. |
| 3292 NearLabel done; | 3292 Label done; |
| 3293 __ testl(rdx, Immediate(0xFFFFFF00)); | 3293 __ testl(rdx, Immediate(0xFFFFFF00)); |
| 3294 __ j(zero, &done); | 3294 __ j(zero, &done, Label::kNear); |
| 3295 __ setcc(negative, rdx); // 1 if negative, 0 if positive. | 3295 __ setcc(negative, rdx); // 1 if negative, 0 if positive. |
| 3296 __ decb(rdx); // 0 if negative, 255 if positive. | 3296 __ decb(rdx); // 0 if negative, 255 if positive. |
| 3297 __ bind(&done); | 3297 __ bind(&done); |
| 3298 } | 3298 } |
| 3299 __ movb(Operand(rbx, rdi, times_1, 0), rdx); | 3299 __ movb(Operand(rbx, rdi, times_1, 0), rdx); |
| 3300 break; | 3300 break; |
| 3301 case kExternalByteArray: | 3301 case kExternalByteArray: |
| 3302 case kExternalUnsignedByteArray: | 3302 case kExternalUnsignedByteArray: |
| 3303 __ movb(Operand(rbx, rdi, times_1, 0), rdx); | 3303 __ movb(Operand(rbx, rdi, times_1, 0), rdx); |
| 3304 break; | 3304 break; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3413 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); | 3413 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
| 3414 | 3414 |
| 3415 return GetCode(flags); | 3415 return GetCode(flags); |
| 3416 } | 3416 } |
| 3417 | 3417 |
| 3418 #undef __ | 3418 #undef __ |
| 3419 | 3419 |
| 3420 } } // namespace v8::internal | 3420 } } // namespace v8::internal |
| 3421 | 3421 |
| 3422 #endif // V8_TARGET_ARCH_X64 | 3422 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |