diff options
-rw-r--r-- | powerpc/Asmexpand.ml | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | powerpc/CBuiltins.ml | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index 35aa02d5..20ae0f66 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -490,8 +490,8 @@ let expand_builtin_inline name args res = emit (Plwz(res, Cint ofs, GPR1)) | "__builtin_return_address",_,BR (IR res) -> emit (Plwz (res, Cint! retaddr_offset,GPR1)) - (* isel *) - | "__builtin_isel", [BA (IR a1); BA (IR a2); BA (IR a3)],BR (IR res) -> + (* Integer selection *) + | ("__builtin_isel" | "__builtin_uisel"), [BA (IR a1); BA (IR a2); BA (IR a3)],BR (IR res) -> if eref then begin emit (Pcmpwi (a1,Cint (Int.zero))); emit (Pisel (res,a3,a2,CRbit_2)) diff --git a/powerpc/CBuiltins.ml b/powerpc/CBuiltins.ml index 106ba4d0..6efeff17 100644..100755 --- a/powerpc/CBuiltins.ml +++ b/powerpc/CBuiltins.ml @@ -119,6 +119,9 @@ let builtins = { (* isel *) "__builtin_isel", (TInt (IInt, []),[TInt(IBool, []);TInt(IInt, []);TInt(IInt, [])],false); + (* uisel *) + "__builtin_uisel", + (TInt (IUInt, []),[TInt(IBool, []);TInt(IUInt, []);TInt(IUInt, [])],false); (* atomic operations *) "__builtin_atomic_exchange", (TVoid [], [TPtr (TInt(IInt, []),[]);TPtr (TInt(IInt, []),[]);TPtr (TInt(IInt, []),[])],false); |