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

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

Issue 11185052: Put more constants in movw/movt instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/assembler-arm.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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1180
1181 void pop() { 1181 void pop() {
1182 add(sp, sp, Operand(kPointerSize)); 1182 add(sp, sp, Operand(kPointerSize));
1183 } 1183 }
1184 1184
1185 // Jump unconditionally to given label. 1185 // Jump unconditionally to given label.
1186 void jmp(Label* L) { b(L, al); } 1186 void jmp(Label* L) { b(L, al); }
1187 1187
1188 bool predictable_code_size() const { return predictable_code_size_; } 1188 bool predictable_code_size() const { return predictable_code_size_; }
1189 1189
1190 static bool allow_immediate_constant_pool_loads( 1190 static bool use_immediate_constant_pool_loads(
1191 const Assembler* assembler) { 1191 const Assembler* assembler) {
1192 #ifdef USE_BLX
1192 return CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && 1193 return CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) &&
1193 (assembler == NULL || !assembler->predictable_code_size()); 1194 (assembler == NULL || !assembler->predictable_code_size());
1195 #else
1196 // If not using BLX, all loads from the constant pool cannot be immediate,
1197 // because the ldr pc, [pc + #xxxx] used for calls must be a single
1198 // instruction and cannot be easily distinguished out of context from
1199 // other loads that could use movw/movt.
1200 return false;
1201 #endif
1194 } 1202 }
1195 1203
1196 // Check the code size generated from label to here. 1204 // Check the code size generated from label to here.
1197 int SizeOfCodeGeneratedSince(Label* label) { 1205 int SizeOfCodeGeneratedSince(Label* label) {
1198 return pc_offset() - label->pos(); 1206 return pc_offset() - label->pos();
1199 } 1207 }
1200 1208
1201 // Check the number of instructions generated from label to here. 1209 // Check the number of instructions generated from label to here.
1202 int InstructionsGeneratedSince(Label* label) { 1210 int InstructionsGeneratedSince(Label* label) {
1203 return SizeOfCodeGeneratedSince(label) / kInstrSize; 1211 return SizeOfCodeGeneratedSince(label) / kInstrSize;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 1528
1521 private: 1529 private:
1522 Assembler* asm_; 1530 Assembler* asm_;
1523 bool old_value_; 1531 bool old_value_;
1524 }; 1532 };
1525 1533
1526 1534
1527 } } // namespace v8::internal 1535 } } // namespace v8::internal
1528 1536
1529 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1537 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698