| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 3588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3599 case kExternalPixelArray: | 3599 case kExternalPixelArray: |
| 3600 { // Clamp the value to [0..255]. | 3600 { // Clamp the value to [0..255]. |
| 3601 NearLabel done; | 3601 NearLabel done; |
| 3602 __ test(ecx, Immediate(0xFFFFFF00)); | 3602 __ test(ecx, Immediate(0xFFFFFF00)); |
| 3603 __ j(zero, &done); | 3603 __ j(zero, &done); |
| 3604 __ setcc(negative, ecx); // 1 if negative, 0 if positive. | 3604 __ setcc(negative, ecx); // 1 if negative, 0 if positive. |
| 3605 __ dec_b(ecx); // 0 if negative, 255 if positive. | 3605 __ dec_b(ecx); // 0 if negative, 255 if positive. |
| 3606 __ bind(&done); | 3606 __ bind(&done); |
| 3607 } | 3607 } |
| 3608 __ mov_b(Operand(edi, ebx, times_1, 0), ecx); | 3608 __ mov_b(Operand(edi, ebx, times_1, 0), ecx); |
| 3609 break; |
| 3609 case kExternalByteArray: | 3610 case kExternalByteArray: |
| 3610 case kExternalUnsignedByteArray: | 3611 case kExternalUnsignedByteArray: |
| 3611 __ mov_b(Operand(edi, ebx, times_1, 0), ecx); | 3612 __ mov_b(Operand(edi, ebx, times_1, 0), ecx); |
| 3612 break; | 3613 break; |
| 3613 case kExternalShortArray: | 3614 case kExternalShortArray: |
| 3614 case kExternalUnsignedShortArray: | 3615 case kExternalUnsignedShortArray: |
| 3615 __ mov_w(Operand(edi, ebx, times_2, 0), ecx); | 3616 __ mov_w(Operand(edi, ebx, times_2, 0), ecx); |
| 3616 break; | 3617 break; |
| 3617 default: | 3618 default: |
| 3618 UNREACHABLE(); | 3619 UNREACHABLE(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3678 | 3679 |
| 3679 return GetCode(flags); | 3680 return GetCode(flags); |
| 3680 } | 3681 } |
| 3681 | 3682 |
| 3682 | 3683 |
| 3683 #undef __ | 3684 #undef __ |
| 3684 | 3685 |
| 3685 } } // namespace v8::internal | 3686 } } // namespace v8::internal |
| 3686 | 3687 |
| 3687 #endif // V8_TARGET_ARCH_IA32 | 3688 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |