Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: src/arm/assembler-arm.cc

Issue 23530065: Thumb2 Backend: Branch, load, store, misc. instruction encoding methods Base URL: HEAD^
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/assembler-thumb.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 return false; 1081 return false;
1082 } 1082 }
1083 } else { 1083 } else {
1084 // No use of constant pool and the immediate operand can be encoded as a 1084 // No use of constant pool and the immediate operand can be encoded as a
1085 // shifter operand. 1085 // shifter operand.
1086 return true; 1086 return true;
1087 } 1087 }
1088 } 1088 }
1089 1089
1090 1090
1091 void Assembler::move_32_bit_immediate_thumb(Register rd,
1092 SBit s,
1093 const Operand& x,
1094 Condition cond) {
1095 if (rd.code() != pc.code() && s == LeaveCC) {
1096 if (use_movw_movt(x, this)) {
1097 if (x.must_output_reloc_info(this)) {
1098 RecordRelocInfo(x.rmode_, x.imm32_, DONT_USE_CONSTANT_POOL);
1099 // Make sure the movw/movt doesn't get separated.
1100 BlockConstPoolFor(2);
1101 }
1102 if (cond != al) {
1103 pc_ -= kInstr16Size;
1104 it_thumb(cond, 2, true);
1105 }
1106 emit32(thumb32_mode3(MOV_32_IMM3) |
1107 thumb32_1reg_zero_extend_imm_split_4i38(rd, (x.imm32_ & 0xffff)));
1108 movt_thumb(rd, static_cast<uint32_t>(x.imm32_) >> 16, al);
1109 return;
1110 }
1111 }
1112 RecordRelocInfo(x.rmode_, x.imm32_, USE_CONSTANT_POOL);
1113 ldr_thumb(rd, MemOperand(pc, 0));
1114 }
1115
1116
1091 void Assembler::move_32_bit_immediate(Condition cond, 1117 void Assembler::move_32_bit_immediate(Condition cond,
1092 Register rd, 1118 Register rd,
1093 SBit s, 1119 SBit s,
1094 const Operand& x) { 1120 const Operand& x) {
1095 if (rd.code() != pc.code() && s == LeaveCC) { 1121 if (rd.code() != pc.code() && s == LeaveCC) {
1096 if (use_movw_movt(x, this)) { 1122 if (use_movw_movt(x, this)) {
1097 if (x.must_output_reloc_info(this)) { 1123 if (x.must_output_reloc_info(this)) {
1098 RecordRelocInfo(x.rmode_, x.imm32_, DONT_USE_CONSTANT_POOL); 1124 RecordRelocInfo(x.rmode_, x.imm32_, DONT_USE_CONSTANT_POOL);
1099 // Make sure the movw/movt doesn't get separated. 1125 // Make sure the movw/movt doesn't get separated.
1100 BlockConstPoolFor(2); 1126 BlockConstPoolFor(2);
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after
3437 3463
3438 // Since a constant pool was just emitted, move the check offset forward by 3464 // Since a constant pool was just emitted, move the check offset forward by
3439 // the standard interval. 3465 // the standard interval.
3440 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 3466 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
3441 } 3467 }
3442 3468
3443 3469
3444 } } // namespace v8::internal 3470 } } // namespace v8::internal
3445 3471
3446 #endif // V8_TARGET_ARCH_ARM 3472 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/assembler-thumb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698