diff options
author | Bernhard Schommer <bschommer@users.noreply.github.com> | 2017-05-03 11:18:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-03 11:18:32 +0200 |
commit | 7873af34a9520ee5a8a6f10faddf3255a4ff02b2 (patch) | |
tree | 74500c845c99b39ba91a5507656060dea60404ea /x86/SelectOp.vp | |
parent | 25ea686abc4cce13aba92196dbeb284f727b6e0e (diff) | |
download | compcert-7873af34a9520ee5a8a6f10faddf3255a4ff02b2.tar.gz compcert-7873af34a9520ee5a8a6f10faddf3255a4ff02b2.zip |
Hybrid 64bit/32bit PowerPC port
This commit adds code generation for 64bit PowerPC architectures which execute
32bit applications.
The main difference to the normal 32bit PowerPC port is that it uses the
available 64bit instructions instead of using the runtime library functions.
However pointers are still 32bit and the 32bit calling convention is used.
In order to use this port the target architecture must be either in Server
execution mode or if in Embedded execution mode the high order 32 bits of GPRs
must be implemented in 32-bit mode. Furthermore the operating system must
preserve the high order 32 bits of GPRs.
Diffstat (limited to 'x86/SelectOp.vp')
-rw-r--r-- | x86/SelectOp.vp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/x86/SelectOp.vp b/x86/SelectOp.vp index 2037760f..1200c3d7 100644 --- a/x86/SelectOp.vp +++ b/x86/SelectOp.vp @@ -369,14 +369,14 @@ Nondetfunction compimm (default: comparison -> int -> condition) Eop (Ocmp (negate_condition c)) el else if Int.eq_dec n2 Int.one then Eop (Ocmp c) el - else + else Eop (Ointconst Int.zero) Enil | Cne, Eop (Ocmp c) el => if Int.eq_dec n2 Int.zero then Eop (Ocmp c) el else if Int.eq_dec n2 Int.one then Eop (Ocmp (negate_condition c)) el - else + else Eop (Ointconst Int.one) Enil | Ceq, Eop (Oandimm n1) (t1 ::: Enil) => if Int.eq_dec n2 Int.zero then @@ -420,7 +420,7 @@ Definition compfs (c: comparison) (e1: expr) (e2: expr) := (** ** Integer conversions *) -Nondetfunction cast8unsigned (e: expr) := +Nondetfunction cast8unsigned (e: expr) := match e with | Eop (Ointconst n) Enil => Eop (Ointconst (Int.zero_ext 8 n)) Enil @@ -438,7 +438,7 @@ Nondetfunction cast8signed (e: expr) := Eop Ocast8signed (e ::: Enil) end. -Nondetfunction cast16unsigned (e: expr) := +Nondetfunction cast16unsigned (e: expr) := match e with | Eop (Ointconst n) Enil => Eop (Ointconst (Int.zero_ext 16 n)) Enil |