|
From: <sv...@va...> - 2015-01-19 23:54:20
|
Author: sewardj
Date: Mon Jan 19 23:54:08 2015
New Revision: 3071
Log:
Change the order of arguments to NInstr_{LoadU,Store} so as to put the
size argument first. That makes code that uses it somewhat easier to
read. No functional change.
Modified:
branches/NCODE/priv/ir_defs.c
branches/NCODE/pub/libvex_ir.h
Modified: branches/NCODE/priv/ir_defs.c
==============================================================================
--- branches/NCODE/priv/ir_defs.c (original)
+++ branches/NCODE/priv/ir_defs.c Mon Jan 19 23:54:08 2015
@@ -2075,22 +2075,22 @@
in->Nin.MovW.src = src;
return in;
}
-NInstr* NInstr_LoadU ( NAlloc na, NReg dst, NEA* addr, UChar szB )
+NInstr* NInstr_LoadU ( NAlloc na, UChar szB, NReg dst, NEA* addr )
{
NInstr* in = na(sizeof(NInstr));
in->tag = Nin_LoadU;
+ in->Nin.LoadU.szB = szB;
in->Nin.LoadU.dst = dst;
in->Nin.LoadU.addr = addr;
- in->Nin.LoadU.szB = szB;
return in;
}
-NInstr* NInstr_Store ( NAlloc na, NReg src, NEA* addr, UChar szB )
+NInstr* NInstr_Store ( NAlloc na, UChar szB, NReg src, NEA* addr )
{
NInstr* in = na(sizeof(NInstr));
in->tag = Nin_Store;
+ in->Nin.Store.szB = szB;
in->Nin.Store.src = src;
in->Nin.Store.addr = addr;
- in->Nin.Store.szB = szB;
return in;
}
Modified: branches/NCODE/pub/libvex_ir.h
==============================================================================
--- branches/NCODE/pub/libvex_ir.h (original)
+++ branches/NCODE/pub/libvex_ir.h Mon Jan 19 23:54:08 2015
@@ -2796,14 +2796,14 @@
NReg src;
} MovW;
struct {
+ UChar szB; /* 1, 2, 4 or (for 64 bit hosts) 8 */
NReg dst;
NEA* addr;
- UChar szB; /* 1, 2, 4 or (for 64 bit hosts) 8 */
} LoadU;
struct {
+ UChar szB; /* 1, 2, 4 or (for 64 bit hosts) 8 */
NReg src;
NEA* addr;
- UChar szB; /* 1, 2, 4 or (for 64 bit hosts) 8 */
} Store;
}
Nin;
@@ -2823,8 +2823,8 @@
extern NInstr* NInstr_SetFlagsWri ( NAlloc na,
NSetFlags how, NReg srcL, HWord srcR );
extern NInstr* NInstr_MovW ( NAlloc na, NReg dst, NReg src );
-extern NInstr* NInstr_LoadU ( NAlloc na, NReg dst, NEA* addr, UChar szB );
-extern NInstr* NInstr_Store ( NAlloc na, NReg src, NEA* addr, UChar szB );
+extern NInstr* NInstr_LoadU ( NAlloc na, UChar szB, NReg dst, NEA* addr );
+extern NInstr* NInstr_Store ( NAlloc na, UChar szB, NReg src, NEA* addr );
extern void ppNInstr ( const NInstr* );
|