OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 ASSERT(allow_macro_instructions_); | 1279 ASSERT(allow_macro_instructions_); |
1280 ASSERT(!rd.IsZero()); | 1280 ASSERT(!rd.IsZero()); |
1281 uxtw(rd, rn); | 1281 uxtw(rd, rn); |
1282 } | 1282 } |
1283 | 1283 |
1284 | 1284 |
1285 void MacroAssembler::BumpSystemStackPointer(const Operand& space) { | 1285 void MacroAssembler::BumpSystemStackPointer(const Operand& space) { |
1286 ASSERT(!csp.Is(sp_)); | 1286 ASSERT(!csp.Is(sp_)); |
1287 // TODO(jbramley): Several callers rely on this not using scratch registers, | 1287 // TODO(jbramley): Several callers rely on this not using scratch registers, |
1288 // so we use the assembler directly here. However, this means that large | 1288 // so we use the assembler directly here. However, this means that large |
1289 // immediate values of 'space' cannot be handled cleanly. Once we implement | 1289 // immediate values of 'space' cannot be handled. Once we merge with V8, we |
1290 // our flexible scratch register idea, we could greatly simplify this | 1290 // should try to use the new scope that controls scratch register usage. |
1291 // function. | |
1292 InstructionAccurateScope scope(this); | 1291 InstructionAccurateScope scope(this); |
1293 if ((space.IsImmediate()) && !is_uint12(space.immediate())) { | 1292 if ((space.IsImmediate()) && !is_uint12(space.immediate())) { |
1294 // The subtract instruction supports a 12-bit immediate, shifted left by | 1293 // The subtract instruction supports a 12-bit immediate, shifted left by |
1295 // zero or 12 bits. So, in two instructions, we can subtract any immediate | 1294 // zero or 12 bits. So, in two instructions, we can subtract any immediate |
1296 // between zero and (1 << 24) - 1. | 1295 // between zero and (1 << 24) - 1. |
1297 int64_t imm = space.immediate(); | 1296 int64_t imm = space.immediate(); |
1298 ASSERT(is_uint24(imm)); | 1297 ASSERT(is_uint24(imm)); |
1299 | 1298 |
1300 int64_t imm_top_12_bits = imm >> 12; | 1299 int64_t imm_top_12_bits = imm >> 12; |
1301 sub(csp, StackPointer(), imm_top_12_bits << 12); | 1300 sub(csp, StackPointer(), imm_top_12_bits << 12); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1674 // characters are reserved for controlling features of the instrumentation. | 1673 // characters are reserved for controlling features of the instrumentation. |
1675 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); | 1674 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); |
1676 | 1675 |
1677 InstructionAccurateScope scope(this, 1); | 1676 InstructionAccurateScope scope(this, 1); |
1678 movn(xzr, (marker_name[1] << 8) | marker_name[0]); | 1677 movn(xzr, (marker_name[1] << 8) | marker_name[0]); |
1679 } | 1678 } |
1680 | 1679 |
1681 } } // namespace v8::internal | 1680 } } // namespace v8::internal |
1682 | 1681 |
1683 #endif // V8_A64_MACRO_ASSEMBLER_A64_INL_H_ | 1682 #endif // V8_A64_MACRO_ASSEMBLER_A64_INL_H_ |
OLD | NEW |