|
From: abhishek b. <abh...@gm...> - 2012-01-16 18:32:28
|
I am trying to implement instruction "efscmpgt" for MontaVista ppc e500.
The instr is a SPFP specific.
Can someone please tell me how do I fill the details in mkFormA i.e., "??"
Below are the details.
host_ppc_defs.c
Int emit_PPCInstr ( UChar* buf,
.......
.....
..
3259 case Pin_FpUnary: {
3260 UInt fr_dst = fregNo(i->Pin.FpUnary.dst);
3261 UInt fr_src = fregNo(i->Pin.FpUnary.src);
3262 switch (i->Pin.FpUnary.op) {
3263 case Pfp_RSQRTE: // frsqrtre, PPC32 p424
3264 p = mkFormA( p, 63, fr_dst, 0, fr_src, 0, 26, 0 );
3265 break;
Case Pfp_CMPGT: // fcmpgt,
p = mkFormA(p, ??, fr_dst, 0, fr_src,0,??,0);
break;
3266 case Pfp_RES: // fres, PPC32 p421
3267 p = mkFormA( p, 59, fr_dst, 0, fr_src, 0, 24, 0 );
3268 break;
3269 case Pfp_SQRT: // fsqrt, PPC32 p427
3270 p = mkFormA( p, 63, fr_dst, 0, fr_src, 0, 22, 0 );
3271 break;
3272 case Pfp_ABS: // fabs, PPC32 p399
3273 p = mkFormX(p, 63, fr_dst, 0, fr_src, 264, 0);
3274 break;
|
|
From: Julian S. <js...@ac...> - 2012-01-18 21:57:14
|
On Monday, January 16, 2012, abhishek bhadauria wrote: > I am trying to implement instruction "efscmpgt" for MontaVista ppc e500. > The instr is a SPFP specific. > Can someone please tell me how do I fill the details in mkFormA i.e., "??" IIRC the instruction set documentation divides up the instructions into various "formats", eg "X form", "A form" etc. mkFormX, mkFormA etc just take the components of the instruction to be created, and OR them together. So you'll need to figure out the format of the insn you are trying to make, find out the component values, and give them to mkFormA. J |