| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 emit_modrm(src, dst); | 2051 emit_modrm(src, dst); |
| 2052 } else { | 2052 } else { |
| 2053 emit_rex_64(dst, src); | 2053 emit_rex_64(dst, src); |
| 2054 emit(0x85); | 2054 emit(0x85); |
| 2055 emit_modrm(dst, src); | 2055 emit_modrm(dst, src); |
| 2056 } | 2056 } |
| 2057 } | 2057 } |
| 2058 | 2058 |
| 2059 | 2059 |
| 2060 void Assembler::testq(Register dst, Immediate mask) { | 2060 void Assembler::testq(Register dst, Immediate mask) { |
| 2061 if (is_uint8(mask.value_)) { |
| 2062 testb(dst, mask); |
| 2063 return; |
| 2064 } |
| 2061 EnsureSpace ensure_space(this); | 2065 EnsureSpace ensure_space(this); |
| 2062 if (dst.is(rax)) { | 2066 if (dst.is(rax)) { |
| 2063 emit_rex_64(); | 2067 emit_rex_64(); |
| 2064 emit(0xA9); | 2068 emit(0xA9); |
| 2065 emit(mask); | 2069 emit(mask); |
| 2066 } else { | 2070 } else { |
| 2067 emit_rex_64(dst); | 2071 emit_rex_64(dst); |
| 2068 emit(0xF7); | 2072 emit(0xF7); |
| 2069 emit_modrm(0, dst); | 2073 emit_modrm(0, dst); |
| 2070 emit(mask); | 2074 emit(mask); |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3047 bool RelocInfo::IsCodedSpecially() { | 3051 bool RelocInfo::IsCodedSpecially() { |
| 3048 // The deserializer needs to know whether a pointer is specially coded. Being | 3052 // The deserializer needs to know whether a pointer is specially coded. Being |
| 3049 // specially coded on x64 means that it is a relative 32 bit address, as used | 3053 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3050 // by branch instructions. | 3054 // by branch instructions. |
| 3051 return (1 << rmode_) & kApplyMask; | 3055 return (1 << rmode_) & kApplyMask; |
| 3052 } | 3056 } |
| 3053 | 3057 |
| 3054 } } // namespace v8::internal | 3058 } } // namespace v8::internal |
| 3055 | 3059 |
| 3056 #endif // V8_TARGET_ARCH_X64 | 3060 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |