ajhc-0.8.0.7: Haskell compiler that produce binary through C language

Safe HaskellNone

Cmm.Op

Documentation

data BinOp Source

Constructors

Add 
Sub 
Mul 
Mulx 
UMulx 
Div

round to -Infinity

Mod

mod rounding to -Infinity

Quot

round to 0

Rem

rem rounding to 0

UDiv

round to zero (unsigned)

UMod

unsigned mod

And 
Or 
Xor 
Shl 
Shr

shift right logical

Shra

shift right arithmetic

Rotl 
Rotr 
FAdd 
FSub 
FDiv 
FMul 
FPwr 
FAtan2 
Eq 
NEq 
Gt 
Gte 
Lt 
Lte 
UGt 
UGte 
ULt 
ULte 
FEq 
FNEq 
FGt 
FGte 
FLt 
FLte 
FOrdered 

data UnOp Source

Constructors

Neg

2s compliment negation

Com

bitwise compliment floating

FAbs

floating absolute value

FNeg

floating point negation

Sin 
Cos 
Tan 
Sinh 
Cosh 
Tanh 
Asin 
Acos 
Atan 
Log 
Exp 
Sqrt 
Bswap

Switch the order of the bytes in a word

Ffs

Returns one plus the index of the least significant 1-bit of x, 0 if x is zero.

Clz

number of leading (from MSB) zeros, undefined if zero

Ctz

number of trailing (from LSB) zeros, undefined if zero.

Popcount

number of bits set to 1 in word

Parity

number of bits set to 1 mod 2

data ConvOp Source

Constructors

F2I

convert a floating point to an integral value via truncation

F2U

convert a floating point to an unsigned integral value via truncation, negative values become zero

U2F

convert an unsigned integral value to a floating point number

I2F

convert an integral value to a floating point number

F2F

convert a float from one precision to another, preserving value as much as possible

Lobits

extract the low order bits

Sx

sign extend a value (signed)

Zx

zero extend a value (unsigned)

I2I

perform a Lobits or a Sx depending on the sizes of the arguments

U2U

perform a Lobits or a Zx depending on the sizes of the arguments

B2B

a nop, useful for coercing hints (bits 2 bits)

data Ty Source

Instances

data Op v Source

Constructors

BinOp BinOp v v 
UnOp UnOp v 
ValOp ValOp 
ConvOp ConvOp v 

Instances

(DocLike d, Show v) => PPrint d (Op v) 
Eq v => Eq (Op v) 
Ord v => Ord (Op v) 
Show v => Show (Op v) 
Binary v_1627847539 => Binary (Op v_1627847539) 
IsOperator (Op v)