Skip to content

Commit

Permalink
10/16 Revision of instructions in Chapter 7
Browse files Browse the repository at this point in the history
Implementation Notes:
  1. For opcode 57, 58, ext opcode resides in 30-31 bit.
  2. For opcode 61 (111101), the ext opcode resides in 29-31 bit or 30-31 bit,
     depending on whether 30-31 bit is 01. (Manual page 1194)
  3. For the instructions with RMC and R, R is always at the 15th bit.
  4. For opcode 60, the Rc bit is at the 21th bit.

new:
  - Flag bit EX (31th bit), (P634)

left to be entered:
  - stv(P492) & stxv(P507) , with DQ(RA) pattern.
  - In opcode 60, two with XX3 format and 3 arbitrary bits and one with XX4 format.
  • Loading branch information
Yuhan Xie committed Oct 16, 2018
1 parent b19e347 commit 63c1340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/h/entryIDs.h
Expand Up @@ -1784,7 +1784,7 @@ enum entryID {
power_op_xsresp,
//--skipped xsrqpi & xsrqpix
//P634, two instructions sharing the same opcode, differentiated by EX bit
//power_op_xsrqpi,
power_op_xsrqpi,
//power_op_xsrqpix,

//P636, included RMC, it always goes along with an R bit at 15th bit.
Expand Down
5 changes: 2 additions & 3 deletions instructionAPI/src/power_opcode_tables.C
Expand Up @@ -850,9 +850,8 @@ extended_op_60[507] = power_entry(power_op_xvtstdcdp, "xvtstdcdp", NULL, list_of

extended_op_63[0] = power_entry(power_op_fcmpu, "fcmpu", NULL, list_of(fn(setFPMode))(fn(BF))(fn(FRA))(fn(FRB)));

//two instructions: xsaddqp and xsaddqpp sharing the same opcode, RO is used for rounding
extended_op_63[4] = power_entry(power_op_xsaddqp, "xsaddqp", NULL, list_of(fn(VRT))(fn(VRA))(fn(VRB))(fn(RO)));

extended_op_63[5] = power_entry(power_op_xsrqpi, "xsrqpi", NULL, list_of(fn(R))(fn(VRT))(fn(VRB))(fn(RMC))(fn(EX)));
extended_op_63[12] = power_entry(power_op_frsp, "frsp", NULL, list_of(fn(setFPMode))(fn(FRT))(fn(FRB))(fn(Rc)));
extended_op_63[14] = power_entry(power_op_fctiw, "fctiw", NULL, list_of(fn(setFPMode))(fn(FRT))(fn(FRB))(fn(Rc)));
extended_op_63[15] = power_entry(power_op_fctiwz, "fctiwz", NULL, list_of(fn(setFPMode))(fn(FRT))(fn(FRB))(fn(Rc)));
Expand All @@ -873,7 +872,7 @@ extended_op_63[31] = power_entry(power_op_fnmadd, "fnmadd", NULL,
list_of(fn(setFPMode))(fn(FRT))(fn(FRA))(fn(FRB))(fn(FRC))(fn(Rc)));
extended_op_63[32] = power_entry(power_op_fcmpo, "fcmpo", NULL, list_of(fn(setFPMode))(fn(BF))(fn(FRA))(fn(FRB)));
extended_op_63[36] = power_entry(power_op_xsmulqp, "xsmulqp", NULL, list_of(fn(VRT))(fn(VRA))(fn(VRB))(fn(RO)));
extended_op_63[37] = power_entry(power_op_xsrqpxp, "xsrqpxp", NULL, list_of(fn(VRT))(fn(VRB))(fn(RMC)));
extended_op_63[37] = power_entry(power_op_xsrqpxp, "xsrqpxp", NULL, list_of((fn(R))fn(VRT))(fn(VRB))(fn(RMC)));
extended_op_63[38] = power_entry(power_op_mtfsb1, "mtfsb1", NULL, list_of(fn(setFPMode))(fn(BT))(fn(Rc)));
extended_op_63[40] = power_entry(power_op_fneg, "fneg", NULL, list_of(fn(setFPMode))(fn(FRT))(fn(FRB))(fn(Rc)));
extended_op_63[64] = power_entry(power_op_mcrfs, "mcrfs", NULL, list_of(fn(BF))(fn(BFA)));
Expand Down

0 comments on commit 63c1340

Please sign in to comment.