equal
deleted
inserted
replaced
225 "inconsistent address"); |
225 "inconsistent address"); |
226 } |
226 } |
227 #endif // ASSERT |
227 #endif // ASSERT |
228 |
228 |
229 // accessors |
229 // accessors |
230 bool uses(Register reg) const { |
230 bool uses(Register reg) const { return _base == reg || _index == reg; } |
231 return _base == reg || _index == reg; |
231 Register base() const { return _base; } |
232 } |
232 Register index() const { return _index; } |
|
233 ScaleFactor scale() const { return _scale; } |
|
234 int disp() const { return _disp; } |
233 |
235 |
234 // Convert the raw encoding form into the form expected by the constructor for |
236 // Convert the raw encoding form into the form expected by the constructor for |
235 // Address. An index of 4 (rsp) corresponds to having no index, so convert |
237 // Address. An index of 4 (rsp) corresponds to having no index, so convert |
236 // that to noreg for the Address constructor. |
238 // that to noreg for the Address constructor. |
237 static Address make_raw(int base, int index, int scale, int disp); |
239 static Address make_raw(int base, int index, int scale, int disp); |
1308 // |
1310 // |
1309 // Instructions for which a 'better' code sequence exists depending |
1311 // Instructions for which a 'better' code sequence exists depending |
1310 // on arguments should also go in here. |
1312 // on arguments should also go in here. |
1311 |
1313 |
1312 class MacroAssembler: public Assembler { |
1314 class MacroAssembler: public Assembler { |
1313 friend class LIR_Assembler; |
1315 friend class LIR_Assembler; |
|
1316 friend class Runtime1; // as_Address() |
1314 protected: |
1317 protected: |
1315 |
1318 |
1316 Address as_Address(AddressLiteral adr); |
1319 Address as_Address(AddressLiteral adr); |
1317 Address as_Address(ArrayAddress adr); |
1320 Address as_Address(ArrayAddress adr); |
1318 |
1321 |
1450 void leave(); |
1453 void leave(); |
1451 |
1454 |
1452 // Support for getting the JavaThread pointer (i.e.; a reference to thread-local information) |
1455 // Support for getting the JavaThread pointer (i.e.; a reference to thread-local information) |
1453 // The pointer will be loaded into the thread register. |
1456 // The pointer will be loaded into the thread register. |
1454 void get_thread(Register thread); |
1457 void get_thread(Register thread); |
|
1458 |
1455 |
1459 |
1456 // Support for VM calls |
1460 // Support for VM calls |
1457 // |
1461 // |
1458 // It is imperative that all calls into the VM are handled via the call_VM macros. |
1462 // It is imperative that all calls into the VM are handled via the call_VM macros. |
1459 // They make sure that the stack linkage is setup correctly. call_VM's correspond |
1463 // They make sure that the stack linkage is setup correctly. call_VM's correspond |
1525 |
1529 |
1526 // Stores |
1530 // Stores |
1527 void store_check(Register obj); // store check for obj - register is destroyed afterwards |
1531 void store_check(Register obj); // store check for obj - register is destroyed afterwards |
1528 void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) |
1532 void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed) |
1529 |
1533 |
|
1534 void g1_write_barrier_pre(Register obj, |
|
1535 #ifndef _LP64 |
|
1536 Register thread, |
|
1537 #endif |
|
1538 Register tmp, |
|
1539 Register tmp2, |
|
1540 bool tosca_live); |
|
1541 void g1_write_barrier_post(Register store_addr, |
|
1542 Register new_val, |
|
1543 #ifndef _LP64 |
|
1544 Register thread, |
|
1545 #endif |
|
1546 Register tmp, |
|
1547 Register tmp2); |
|
1548 |
|
1549 |
1530 // split store_check(Register obj) to enhance instruction interleaving |
1550 // split store_check(Register obj) to enhance instruction interleaving |
1531 void store_check_part_1(Register obj); |
1551 void store_check_part_1(Register obj); |
1532 void store_check_part_2(Register obj); |
1552 void store_check_part_2(Register obj); |
1533 |
1553 |
1534 // C 'boolean' to Java boolean: x == 0 ? 0 : 1 |
1554 // C 'boolean' to Java boolean: x == 0 ? 0 : 1 |