mirror of
https://github.com/danog/ir.git
synced 2024-12-02 17:55:40 +01:00
34 lines
480 B
Plaintext
34 lines
480 B
Plaintext
--TEST--
|
|
002: COND(D,I,I)
|
|
--TARGET--
|
|
x86
|
|
--ARGS--
|
|
-S
|
|
--CODE--
|
|
{
|
|
l_1 = START(ret);
|
|
double x = PARAM(l_1, "x", 1);
|
|
int32_t y = PARAM(l_1, "y", 2);
|
|
int32_t z = PARAM(l_1, "z", 3);
|
|
int32_t val = COND(x, y, z);
|
|
ret = RETURN(l_1, val);
|
|
}
|
|
--EXPECT--
|
|
test:
|
|
movsd 4(%esp), %xmm0
|
|
movl 0xc(%esp), %eax
|
|
movl 0x10(%esp), %ecx
|
|
ucomisd .L4, %xmm0
|
|
jp .L1
|
|
je .L2
|
|
.L1:
|
|
jmp .L3
|
|
.L2:
|
|
movl %ecx, %eax
|
|
.L3:
|
|
retl
|
|
.rodata
|
|
.db 0x90
|
|
.L4:
|
|
.db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|