374 |
374 |
375 STW_OPCODE = (36u << OPCODE_SHIFT), |
375 STW_OPCODE = (36u << OPCODE_SHIFT), |
376 STWX_OPCODE = (31u << OPCODE_SHIFT | 151u << 1), |
376 STWX_OPCODE = (31u << OPCODE_SHIFT | 151u << 1), |
377 STWU_OPCODE = (37u << OPCODE_SHIFT), |
377 STWU_OPCODE = (37u << OPCODE_SHIFT), |
378 STWUX_OPCODE = (31u << OPCODE_SHIFT | 183u << 1), |
378 STWUX_OPCODE = (31u << OPCODE_SHIFT | 183u << 1), |
|
379 STWBRX_OPCODE = (31u << OPCODE_SHIFT | 662u << 1), |
379 |
380 |
380 STH_OPCODE = (44u << OPCODE_SHIFT), |
381 STH_OPCODE = (44u << OPCODE_SHIFT), |
381 STHX_OPCODE = (31u << OPCODE_SHIFT | 407u << 1), |
382 STHX_OPCODE = (31u << OPCODE_SHIFT | 407u << 1), |
382 STHU_OPCODE = (45u << OPCODE_SHIFT), |
383 STHU_OPCODE = (45u << OPCODE_SHIFT), |
|
384 STHBRX_OPCODE = (31u << OPCODE_SHIFT | 918u << 1), |
383 |
385 |
384 STB_OPCODE = (38u << OPCODE_SHIFT), |
386 STB_OPCODE = (38u << OPCODE_SHIFT), |
385 STBX_OPCODE = (31u << OPCODE_SHIFT | 215u << 1), |
387 STBX_OPCODE = (31u << OPCODE_SHIFT | 215u << 1), |
386 STBU_OPCODE = (39u << OPCODE_SHIFT), |
388 STBU_OPCODE = (39u << OPCODE_SHIFT), |
387 |
389 |
399 // 64 bit opcode encodings |
401 // 64 bit opcode encodings |
400 |
402 |
401 LD_OPCODE = (58u << OPCODE_SHIFT | 0u << XO_30_31_SHIFT), // DS-FORM |
403 LD_OPCODE = (58u << OPCODE_SHIFT | 0u << XO_30_31_SHIFT), // DS-FORM |
402 LDU_OPCODE = (58u << OPCODE_SHIFT | 1u << XO_30_31_SHIFT), // DS-FORM |
404 LDU_OPCODE = (58u << OPCODE_SHIFT | 1u << XO_30_31_SHIFT), // DS-FORM |
403 LDX_OPCODE = (31u << OPCODE_SHIFT | 21u << XO_21_30_SHIFT), // X-FORM |
405 LDX_OPCODE = (31u << OPCODE_SHIFT | 21u << XO_21_30_SHIFT), // X-FORM |
|
406 LDBRX_OPCODE = (31u << OPCODE_SHIFT | 532u << 1), // X-FORM |
404 |
407 |
405 STD_OPCODE = (62u << OPCODE_SHIFT | 0u << XO_30_31_SHIFT), // DS-FORM |
408 STD_OPCODE = (62u << OPCODE_SHIFT | 0u << XO_30_31_SHIFT), // DS-FORM |
406 STDU_OPCODE = (62u << OPCODE_SHIFT | 1u << XO_30_31_SHIFT), // DS-FORM |
409 STDU_OPCODE = (62u << OPCODE_SHIFT | 1u << XO_30_31_SHIFT), // DS-FORM |
407 STDUX_OPCODE = (31u << OPCODE_SHIFT | 181u << 1), // X-FORM |
410 STDUX_OPCODE = (31u << OPCODE_SHIFT | 181u << 1), // X-FORM |
408 STDX_OPCODE = (31u << OPCODE_SHIFT | 149u << XO_21_30_SHIFT), // X-FORM |
411 STDX_OPCODE = (31u << OPCODE_SHIFT | 149u << XO_21_30_SHIFT), // X-FORM |
|
412 STDBRX_OPCODE = (31u << OPCODE_SHIFT | 660u << 1), // X-FORM |
409 |
413 |
410 RLDICR_OPCODE = (30u << OPCODE_SHIFT | 1u << XO_27_29_SHIFT), // MD-FORM |
414 RLDICR_OPCODE = (30u << OPCODE_SHIFT | 1u << XO_27_29_SHIFT), // MD-FORM |
411 RLDICL_OPCODE = (30u << OPCODE_SHIFT | 0u << XO_27_29_SHIFT), // MD-FORM |
415 RLDICL_OPCODE = (30u << OPCODE_SHIFT | 0u << XO_27_29_SHIFT), // MD-FORM |
412 RLDIC_OPCODE = (30u << OPCODE_SHIFT | 2u << XO_27_29_SHIFT), // MD-FORM |
416 RLDIC_OPCODE = (30u << OPCODE_SHIFT | 2u << XO_27_29_SHIFT), // MD-FORM |
413 RLDIMI_OPCODE = (30u << OPCODE_SHIFT | 3u << XO_27_29_SHIFT), // MD-FORM |
417 RLDIMI_OPCODE = (30u << OPCODE_SHIFT | 3u << XO_27_29_SHIFT), // MD-FORM |
1550 // 8 bytes |
1554 // 8 bytes |
1551 inline void ldx( Register d, Register s1, Register s2); |
1555 inline void ldx( Register d, Register s1, Register s2); |
1552 inline void ld( Register d, int si16, Register s1); |
1556 inline void ld( Register d, int si16, Register s1); |
1553 inline void ldu( Register d, int si16, Register s1); |
1557 inline void ldu( Register d, int si16, Register s1); |
1554 |
1558 |
|
1559 // 8 bytes reversed |
|
1560 inline void ldbrx( Register d, Register s1, Register s2); |
|
1561 |
1555 // For convenience. Load pointer into d from b+s1. |
1562 // For convenience. Load pointer into d from b+s1. |
1556 inline void ld_ptr(Register d, int b, Register s1); |
1563 inline void ld_ptr(Register d, int b, Register s1); |
1557 DEBUG_ONLY(inline void ld_ptr(Register d, ByteSize b, Register s1);) |
1564 DEBUG_ONLY(inline void ld_ptr(Register d, ByteSize b, Register s1);) |
1558 |
1565 |
1559 // PPC 1, section 3.3.3 Fixed-Point Store Instructions |
1566 // PPC 1, section 3.3.3 Fixed-Point Store Instructions |
1560 inline void stwx( Register d, Register s1, Register s2); |
1567 inline void stwx( Register d, Register s1, Register s2); |
1561 inline void stw( Register d, int si16, Register s1); |
1568 inline void stw( Register d, int si16, Register s1); |
1562 inline void stwu( Register d, int si16, Register s1); |
1569 inline void stwu( Register d, int si16, Register s1); |
|
1570 inline void stwbrx( Register d, Register s1, Register s2); |
1563 |
1571 |
1564 inline void sthx( Register d, Register s1, Register s2); |
1572 inline void sthx( Register d, Register s1, Register s2); |
1565 inline void sth( Register d, int si16, Register s1); |
1573 inline void sth( Register d, int si16, Register s1); |
1566 inline void sthu( Register d, int si16, Register s1); |
1574 inline void sthu( Register d, int si16, Register s1); |
|
1575 inline void sthbrx( Register d, Register s1, Register s2); |
1567 |
1576 |
1568 inline void stbx( Register d, Register s1, Register s2); |
1577 inline void stbx( Register d, Register s1, Register s2); |
1569 inline void stb( Register d, int si16, Register s1); |
1578 inline void stb( Register d, int si16, Register s1); |
1570 inline void stbu( Register d, int si16, Register s1); |
1579 inline void stbu( Register d, int si16, Register s1); |
1571 |
1580 |
1572 inline void stdx( Register d, Register s1, Register s2); |
1581 inline void stdx( Register d, Register s1, Register s2); |
1573 inline void std( Register d, int si16, Register s1); |
1582 inline void std( Register d, int si16, Register s1); |
1574 inline void stdu( Register d, int si16, Register s1); |
1583 inline void stdu( Register d, int si16, Register s1); |
1575 inline void stdux(Register s, Register a, Register b); |
1584 inline void stdux(Register s, Register a, Register b); |
|
1585 inline void stdbrx( Register d, Register s1, Register s2); |
1576 |
1586 |
1577 inline void st_ptr(Register d, int si16, Register s1); |
1587 inline void st_ptr(Register d, int si16, Register s1); |
1578 DEBUG_ONLY(inline void st_ptr(Register d, ByteSize b, Register s1);) |
1588 DEBUG_ONLY(inline void st_ptr(Register d, ByteSize b, Register s1);) |
1579 |
1589 |
1580 // PPC 1, section 3.3.13 Move To/From System Register Instructions |
1590 // PPC 1, section 3.3.13 Move To/From System Register Instructions |
2180 inline void lhbrx(Register d, Register s2); |
2190 inline void lhbrx(Register d, Register s2); |
2181 inline void lbzx( Register d, Register s2); |
2191 inline void lbzx( Register d, Register s2); |
2182 inline void lbz( Register d, int si16); |
2192 inline void lbz( Register d, int si16); |
2183 inline void ldx( Register d, Register s2); |
2193 inline void ldx( Register d, Register s2); |
2184 inline void ld( Register d, int si16); |
2194 inline void ld( Register d, int si16); |
|
2195 inline void ldbrx(Register d, Register s2); |
2185 inline void stwx( Register d, Register s2); |
2196 inline void stwx( Register d, Register s2); |
2186 inline void stw( Register d, int si16); |
2197 inline void stw( Register d, int si16); |
|
2198 inline void stwbrx( Register d, Register s2); |
2187 inline void sthx( Register d, Register s2); |
2199 inline void sthx( Register d, Register s2); |
2188 inline void sth( Register d, int si16); |
2200 inline void sth( Register d, int si16); |
|
2201 inline void sthbrx( Register d, Register s2); |
2189 inline void stbx( Register d, Register s2); |
2202 inline void stbx( Register d, Register s2); |
2190 inline void stb( Register d, int si16); |
2203 inline void stb( Register d, int si16); |
2191 inline void stdx( Register d, Register s2); |
2204 inline void stdx( Register d, Register s2); |
2192 inline void std( Register d, int si16); |
2205 inline void std( Register d, int si16); |
|
2206 inline void stdbrx( Register d, Register s2); |
2193 |
2207 |
2194 // PPC 2, section 3.2.1 Instruction Cache Instructions |
2208 // PPC 2, section 3.2.1 Instruction Cache Instructions |
2195 inline void icbi( Register s2); |
2209 inline void icbi( Register s2); |
2196 // PPC 2, section 3.2.2 Data Cache Instructions |
2210 // PPC 2, section 3.2.2 Data Cache Instructions |
2197 //inlinevoid dcba( Register s2); // Instruction for embedded processor only. |
2211 //inlinevoid dcba( Register s2); // Instruction for embedded processor only. |