| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 void MacroAssembler::Ret() { | 170 void MacroAssembler::Ret() { |
| 171 #if USE_BX | 171 #if USE_BX |
| 172 bx(lr); | 172 bx(lr); |
| 173 #else | 173 #else |
| 174 mov(pc, Operand(lr)); | 174 mov(pc, Operand(lr)); |
| 175 #endif | 175 #endif |
| 176 } | 176 } |
| 177 | 177 |
| 178 | 178 |
| 179 void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) { |
| 180 // Empty the const pool. |
| 181 CheckConstPool(true, true); |
| 182 add(pc, pc, Operand(index, |
| 183 LSL, |
| 184 assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize)); |
| 185 BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * sizeof(Instr)); |
| 186 nop(); // Jump table alignment. |
| 187 for (int i = 0; i < targets.length(); i++) { |
| 188 b(targets[i]); |
| 189 } |
| 190 } |
| 191 |
| 192 |
| 179 // Will clobber 4 registers: object, offset, scratch, ip. The | 193 // Will clobber 4 registers: object, offset, scratch, ip. The |
| 180 // register 'object' contains a heap object pointer. The heap object | 194 // register 'object' contains a heap object pointer. The heap object |
| 181 // tag is shifted away. | 195 // tag is shifted away. |
| 182 void MacroAssembler::RecordWrite(Register object, Register offset, | 196 void MacroAssembler::RecordWrite(Register object, Register offset, |
| 183 Register scratch) { | 197 Register scratch) { |
| 184 // This is how much we shift the remembered set bit offset to get the | 198 // This is how much we shift the remembered set bit offset to get the |
| 185 // offset of the word in the remembered set. We divide by kBitsPerInt (32, | 199 // offset of the word in the remembered set. We divide by kBitsPerInt (32, |
| 186 // shift right 5) and then multiply by kIntSize (4, shift left 2). | 200 // shift right 5) and then multiply by kIntSize (4, shift left 2). |
| 187 const int kRSetWordShift = 3; | 201 const int kRSetWordShift = 3; |
| 188 | 202 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 #endif | 926 #endif |
| 913 mov(r0, Operand(p0)); | 927 mov(r0, Operand(p0)); |
| 914 push(r0); | 928 push(r0); |
| 915 mov(r0, Operand(Smi::FromInt(p1 - p0))); | 929 mov(r0, Operand(Smi::FromInt(p1 - p0))); |
| 916 push(r0); | 930 push(r0); |
| 917 CallRuntime(Runtime::kAbort, 2); | 931 CallRuntime(Runtime::kAbort, 2); |
| 918 // will not return here | 932 // will not return here |
| 919 } | 933 } |
| 920 | 934 |
| 921 } } // namespace v8::internal | 935 } } // namespace v8::internal |
| OLD | NEW |