nixify
This commit is contained in:
87
test/isel3.ssa
Normal file
87
test/isel3.ssa
Normal file
@@ -0,0 +1,87 @@
|
||||
export function w $slt(w %x, w %y) {
|
||||
@start
|
||||
%r =w csltw %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $sle(w %x, w %y) {
|
||||
@start
|
||||
%r =w cslew %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $sgt(w %x, w %y) {
|
||||
@start
|
||||
%r =w csgtw %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $sge(w %x, w %y) {
|
||||
@start
|
||||
%r =w csgew %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $ult(w %x, w %y) {
|
||||
@start
|
||||
%r =w cultw %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $ule(w %x, w %y) {
|
||||
@start
|
||||
%r =w culew %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $ugt(w %x, w %y) {
|
||||
@start
|
||||
%r =w cugtw %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $uge(w %x, w %y) {
|
||||
@start
|
||||
%r =w cugew %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $eq(w %x, w %y) {
|
||||
@start
|
||||
%r =w ceqw %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
export function w $ne(w %x, w %y) {
|
||||
@start
|
||||
%r =w cnew %x, %y
|
||||
ret %r
|
||||
}
|
||||
|
||||
# >>> driver
|
||||
# #include <math.h>
|
||||
# extern int slt(int, int);
|
||||
# extern int sle(int, int);
|
||||
# extern int sgt(int, int);
|
||||
# extern int sge(int, int);
|
||||
# extern int ult(unsigned, unsigned);
|
||||
# extern int ule(unsigned, unsigned);
|
||||
# extern int ugt(unsigned, unsigned);
|
||||
# extern int uge(unsigned, unsigned);
|
||||
# extern int eq(unsigned, unsigned);
|
||||
# extern int ne(unsigned, unsigned);
|
||||
# int main(void) {
|
||||
# /* LessThan Equal GreaterThan */
|
||||
# return !slt(-1, 0) + slt(0, 0) + slt(0, -1)
|
||||
# + !sle(-1, 0) + !sle(0, 0) + sle(0, -1)
|
||||
# + sgt(-1, 0) + sgt(0, 0) + !sgt(0, -1)
|
||||
# + sge(-1, 0) + !sge(0, 0) + !sge(0, -1)
|
||||
# + !ult(0, -1) + ult(0, 0) + ult(-1, 0)
|
||||
# + !ule(0, -1) + !ule(0, 0) + ule(-1, 0)
|
||||
# + ugt(0, -1) + ugt(0, 0) + !ugt(-1, 0)
|
||||
# + uge(0, -1) + !uge(0, 0) + !uge(-1, 0)
|
||||
# + eq(0, 1) + !eq(0, 0) + eq(1, 0)
|
||||
# + !ne(0, 1) + ne(0, 0) + !ne(1, 0)
|
||||
# ;
|
||||
# }
|
||||
# <<<
|
||||
Reference in New Issue
Block a user