diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-21 15:53:05 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2011-06-21 15:53:05 +0000 |
commit | 58c7f5045c9cf1b64311fd7a168ed3b496666bb0 (patch) | |
tree | b71dc7537a473b26a2109339e6ee21dc69581655 /powerpc/Asm.v | |
parent | b39791601bb128c37db82eb66a8bc1991047818f (diff) |
Recognition of rlwimi instruction (useful for bitfield assignment)
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1676 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/Asm.v')
-rw-r--r-- | powerpc/Asm.v | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/powerpc/Asm.v b/powerpc/Asm.v index fc29db0..d876144 100644 --- a/powerpc/Asm.v +++ b/powerpc/Asm.v @@ -195,6 +195,7 @@ Inductive instruction : Type := | Pori: ireg -> ireg -> constant -> instruction (**r or with immediate *) | Poris: ireg -> ireg -> constant -> instruction (**r or with immediate high *) | Prlwinm: ireg -> ireg -> int -> int -> instruction (**r rotate and mask *) + | Prlwimi: ireg -> ireg -> int -> int -> instruction (**r rotate and insert *) | Pslw: ireg -> ireg -> ireg -> instruction (**r shift left *) | Psraw: ireg -> ireg -> ireg -> instruction (**r shift right signed *) | Psrawi: ireg -> ireg -> int -> instruction (**r shift right signed immediate *) @@ -697,6 +698,9 @@ Definition exec_instr (c: code) (i: instruction) (rs: regset) (m: mem) : outcome OK (nextinstr (rs#rd <- (Val.or rs#r1 (const_high cst)))) m | Prlwinm rd r1 amount mask => OK (nextinstr (rs#rd <- (Val.rolm rs#r1 amount mask))) m + | Prlwimi rd r1 amount mask => + OK (nextinstr (rs#rd <- (Val.or (Val.and rs#rd (Vint (Int.not mask))) + (Val.rolm rs#r1 amount mask)))) m | Pslw rd r1 r2 => OK (nextinstr (rs#rd <- (Val.shl rs#r1 rs#r2))) m | Psraw rd r1 r2 => |