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

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

Issue 9455088: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address Florian's comments. Created 8 years, 9 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 | « src/arm/assembler-arm.h ('k') | src/arm/code-stubs-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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 shift_imm_ = shift_imm & 31; 229 shift_imm_ = shift_imm & 31;
230 am_ = am; 230 am_ = am;
231 } 231 }
232 232
233 233
234 // ----------------------------------------------------------------------------- 234 // -----------------------------------------------------------------------------
235 // Specific instructions, constants, and masks. 235 // Specific instructions, constants, and masks.
236 236
237 // add(sp, sp, 4) instruction (aka Pop()) 237 // add(sp, sp, 4) instruction (aka Pop())
238 const Instr kPopInstruction = 238 const Instr kPopInstruction =
239 al | PostIndex | 4 | LeaveCC | I | sp.code() * B16 | sp.code() * B12; 239 al | PostIndex | 4 | LeaveCC | I | kRegister_sp_Code * B16 |
240 kRegister_sp_Code * B12;
240 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r)) 241 // str(r, MemOperand(sp, 4, NegPreIndex), al) instruction (aka push(r))
241 // register r is not encoded. 242 // register r is not encoded.
242 const Instr kPushRegPattern = 243 const Instr kPushRegPattern =
243 al | B26 | 4 | NegPreIndex | sp.code() * B16; 244 al | B26 | 4 | NegPreIndex | kRegister_sp_Code * B16;
244 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r)) 245 // ldr(r, MemOperand(sp, 4, PostIndex), al) instruction (aka pop(r))
245 // register r is not encoded. 246 // register r is not encoded.
246 const Instr kPopRegPattern = 247 const Instr kPopRegPattern =
247 al | B26 | L | 4 | PostIndex | sp.code() * B16; 248 al | B26 | L | 4 | PostIndex | kRegister_sp_Code * B16;
248 // mov lr, pc 249 // mov lr, pc
249 const Instr kMovLrPc = al | MOV | pc.code() | lr.code() * B12; 250 const Instr kMovLrPc = al | MOV | kRegister_pc_Code | kRegister_lr_Code * B12;
250 // ldr rd, [pc, #offset] 251 // ldr rd, [pc, #offset]
251 const Instr kLdrPCMask = kCondMask | 15 * B24 | 7 * B20 | 15 * B16; 252 const Instr kLdrPCMask = kCondMask | 15 * B24 | 7 * B20 | 15 * B16;
252 const Instr kLdrPCPattern = al | 5 * B24 | L | pc.code() * B16; 253 const Instr kLdrPCPattern = al | 5 * B24 | L | kRegister_pc_Code * B16;
253 // blxcc rm 254 // blxcc rm
254 const Instr kBlxRegMask = 255 const Instr kBlxRegMask =
255 15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4; 256 15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4;
256 const Instr kBlxRegPattern = 257 const Instr kBlxRegPattern =
257 B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | BLX; 258 B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | BLX;
258 const Instr kMovMvnMask = 0x6d * B21 | 0xf * B16; 259 const Instr kMovMvnMask = 0x6d * B21 | 0xf * B16;
259 const Instr kMovMvnPattern = 0xd * B21; 260 const Instr kMovMvnPattern = 0xd * B21;
260 const Instr kMovMvnFlip = B22; 261 const Instr kMovMvnFlip = B22;
261 const Instr kMovLeaveCCMask = 0xdff * B16; 262 const Instr kMovLeaveCCMask = 0xdff * B16;
262 const Instr kMovLeaveCCPattern = 0x1a0 * B16; 263 const Instr kMovLeaveCCPattern = 0x1a0 * B16;
263 const Instr kMovwMask = 0xff * B20; 264 const Instr kMovwMask = 0xff * B20;
264 const Instr kMovwPattern = 0x30 * B20; 265 const Instr kMovwPattern = 0x30 * B20;
265 const Instr kMovwLeaveCCFlip = 0x5 * B21; 266 const Instr kMovwLeaveCCFlip = 0x5 * B21;
266 const Instr kCmpCmnMask = 0xdd * B20 | 0xf * B12; 267 const Instr kCmpCmnMask = 0xdd * B20 | 0xf * B12;
267 const Instr kCmpCmnPattern = 0x15 * B20; 268 const Instr kCmpCmnPattern = 0x15 * B20;
268 const Instr kCmpCmnFlip = B21; 269 const Instr kCmpCmnFlip = B21;
269 const Instr kAddSubFlip = 0x6 * B21; 270 const Instr kAddSubFlip = 0x6 * B21;
270 const Instr kAndBicFlip = 0xe * B21; 271 const Instr kAndBicFlip = 0xe * B21;
271 272
272 // A mask for the Rd register for push, pop, ldr, str instructions. 273 // A mask for the Rd register for push, pop, ldr, str instructions.
273 const Instr kLdrRegFpOffsetPattern = 274 const Instr kLdrRegFpOffsetPattern =
274 al | B26 | L | Offset | fp.code() * B16; 275 al | B26 | L | Offset | kRegister_fp_Code * B16;
275 const Instr kStrRegFpOffsetPattern = 276 const Instr kStrRegFpOffsetPattern =
276 al | B26 | Offset | fp.code() * B16; 277 al | B26 | Offset | kRegister_fp_Code * B16;
277 const Instr kLdrRegFpNegOffsetPattern = 278 const Instr kLdrRegFpNegOffsetPattern =
278 al | B26 | L | NegOffset | fp.code() * B16; 279 al | B26 | L | NegOffset | kRegister_fp_Code * B16;
279 const Instr kStrRegFpNegOffsetPattern = 280 const Instr kStrRegFpNegOffsetPattern =
280 al | B26 | NegOffset | fp.code() * B16; 281 al | B26 | NegOffset | kRegister_fp_Code * B16;
281 const Instr kLdrStrInstrTypeMask = 0xffff0000; 282 const Instr kLdrStrInstrTypeMask = 0xffff0000;
282 const Instr kLdrStrInstrArgumentMask = 0x0000ffff; 283 const Instr kLdrStrInstrArgumentMask = 0x0000ffff;
283 const Instr kLdrStrOffsetMask = 0x00000fff; 284 const Instr kLdrStrOffsetMask = 0x00000fff;
284 285
285 286
286 // Spare buffer. 287 // Spare buffer.
287 static const int kMinimalBufferSize = 4*KB; 288 static const int kMinimalBufferSize = 4*KB;
288 289
289 290
290 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) 291 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size)
(...skipping 2363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 2655
2655 // Since a constant pool was just emitted, move the check offset forward by 2656 // Since a constant pool was just emitted, move the check offset forward by
2656 // the standard interval. 2657 // the standard interval.
2657 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 2658 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
2658 } 2659 }
2659 2660
2660 2661
2661 } } // namespace v8::internal 2662 } } // namespace v8::internal
2662 2663
2663 #endif // V8_TARGET_ARCH_ARM 2664 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698