|
From: Florian K. <br...@ac...> - 2013-01-06 16:04:09
|
On 01/06/2013 10:48 AM, Julian Seward wrote:
>
>>> One change I am looking at is changing the guard type of Mux0X
>>> from I8 to I1. This makes it consistent with I1 guard types for
>>> Dirty helpers and for Exits.
>>
>> Seconded.
>
> I have this working now for ARM, and, obviously, the generic IR
> stuff has been fixed up too. I can do the front/back end fixes
> for x86/amd64/ppc32/ppc64, and possibly MIPS, but I can't do the
> s390 bits. If I make available a patch containing the above stuff,
> can you do the s390 bits?
Sure, no problem.
>> I'm willing to make the change if you and/or other port maintainers are
>> willing to double-check.
>
> Yes, I'm willing to double-check/review.
OK, let's do it them. Do you want to merge COMEM first ?
How about this (with ITE meaning if-then-else)?
Index: VEX/pub/libvex_ir.h
===================================================================
--- VEX/pub/libvex_ir.h (revision 2627)
+++ VEX/pub/libvex_ir.h (working copy)
@@ -1578,7 +1578,7 @@
Iex_Unop,
Iex_Load,
Iex_Const,
- Iex_Mux0X,
+ Iex_ITE,
Iex_CCall
}
IRExprTag;
@@ -1762,18 +1762,18 @@
IRExpr** args; /* Vector of argument expressions. */
} CCall;
- /* A ternary if-then-else operator. It returns expr0 if cond is
- zero, exprX otherwise. Note that it is STRICT, ie. both
- expr0 and exprX are evaluated in all cases.
+ /* A ternary if-then-else operator. It returns iftrue if cond is
+ zero, iffalse otherwise. Note that it is STRICT, ie. both
+ iftrue and iffalse are evaluated in all cases.
- ppIRExpr output: Mux0X(<cond>,<expr0>,<exprX>),
- eg. Mux0X(t6,t7,t8)
+ ppIRExpr output: ITE(<cond>,<iftrue>,<iffalse>),
+ eg. ITE(t6,t7,t8)
*/
struct {
IRExpr* cond; /* Condition */
- IRExpr* expr0; /* True expression */
- IRExpr* exprX; /* False expression */
- } Mux0X;
+ IRExpr* iftrue; /* True expression */
+ IRExpr* iffalse; /* False expression */
+ } ITE;
} Iex;
};
@@ -1808,7 +1808,7 @@
extern IRExpr* IRExpr_Load ( IREndness end, IRType ty, IRExpr* addr );
extern IRExpr* IRExpr_Const ( IRConst* con );
extern IRExpr* IRExpr_CCall ( IRCallee* cee, IRType retty, IRExpr**
args );
-extern IRExpr* IRExpr_Mux0X ( IRExpr* cond, IRExpr* expr0, IRExpr*
exprX );
+extern IRExpr* IRExpr_ITE ( IRExpr* cond, IRExpr* expr0, IRExpr*
exprX );
/* Deep-copy an IRExpr. */
extern IRExpr* deepCopyIRExpr ( IRExpr* );
|