diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-20 14:24:42 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-20 14:24:42 +0000 |
commit | 626ea26cb58e50e7a42f90a6e23218d90df6dd5a (patch) | |
tree | e8214df04ff25411e435210beb8e9e188683b113 /powerpc/Asmexpand.ml | |
parent | e2fa973a4bfea5d47b0d9f41b8734a7b6744dc18 (diff) |
Add builtins for load with reservation and conditional store.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2613 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r-- | powerpc/Asmexpand.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index bec4daa..3554de8 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -418,6 +418,12 @@ let expand_builtin_inline name args res = emit (Pisync) | "__builtin_trap", [], _ -> emit (Ptrap) + | "__builtin_lwar", [IR addr], [IR res] -> + emit (Plwarx(res, GPR0, addr)) + | "__builtin_stwc", [IR addr; IR src], [IR res] -> + emit (Pstwcx_(src, GPR0, addr)); + emit (Pmfcr res); + emit (Prlwinm(res, res, Z.of_uint 3, _1)) (* Vararg stuff *) | "__builtin_va_start", [IR a], _ -> expand_builtin_va_start a |