Changeset 112192 in webkit for trunk/Source/JavaScriptCore/assembler/SH4Assembler.h
- Timestamp:
- Mar 26, 2012, 7:03:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/SH4Assembler.h
r109307 r112192 327 327 }; 328 328 329 enum JumpType { JumpFar, 330 JumpNear 331 }; 332 329 333 SH4Assembler() 330 334 { … … 1189 1193 } 1190 1194 1195 void extraInstrForBranch(RegisterID dst) 1196 { 1197 loadConstantUnReusable(0x0, dst); 1198 nop(); 1199 nop(); 1200 } 1201 1191 1202 AssemblerLabel jmp(RegisterID dst) 1192 1203 { … … 1213 1224 AssemblerLabel label = m_buffer.label(); 1214 1225 branch(BT_OPCODE, 0); 1226 return label; 1227 } 1228 1229 AssemblerLabel bra() 1230 { 1231 AssemblerLabel label = m_buffer.label(); 1232 branch(BRA_OPCODE, 0); 1215 1233 return label; 1216 1234 } … … 1425 1443 // Linking & patching 1426 1444 1427 void linkJump(AssemblerLabel from, AssemblerLabel to )1445 void linkJump(AssemblerLabel from, AssemblerLabel to, JumpType type = JumpFar) 1428 1446 { 1429 1447 ASSERT(to.isSet()); … … 1433 1451 uint16_t instruction = *instructionPtr; 1434 1452 int offsetBits; 1453 1454 if (type == JumpNear) { 1455 ASSERT((instruction == BT_OPCODE) || (instruction == BF_OPCODE) || (instruction == BRA_OPCODE)); 1456 int offset = (codeSize() - from.m_offset) - 4; 1457 *instructionPtr++ = instruction | (offset >> 1); 1458 printInstr(*instructionPtr, from.m_offset + 2); 1459 return; 1460 } 1435 1461 1436 1462 if (((instruction & 0xff00) == BT_OPCODE) || ((instruction & 0xff00) == BF_OPCODE)) {
Note:
See TracChangeset
for help on using the changeset viewer.