cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ryta1203
Journeyman III

AND result in CAL/IL

The result of the following code should be 6, instead it's zero... I'm wondering why this is the case.

const char * HILKernel = "il_cs_2_0\n" "dcl_num_thread_per_group 64\n" "dcl_literal l0, 6, 63, 16, 4\n" "dcl_literal l1, 64, 15, 0, 0\n" "and r6.x, l0.x, l0.y\n" "mov g[vAbsTidFlat.x], r6.xxxx\n" "ret_dyn\n" "end\n"; Resulting ISA code according to SKA 1.3: ; -------- Disassembly -------------------- 00 ALU: ADDR(32) CNT(6) 0 x: MOV R0.x, (0x00000006, 8.407790786e-45f).x y: MOV R0.y, (0x00000006, 8.407790786e-45f).x z: MOV R0.z, (0x00000006, 8.407790786e-45f).x w: MOV R0.w, (0x00000006, 8.407790786e-45f).x t: LSHL R1.x, R0.x, (0x00000002, 2.802596929e-45f).y 01 MEM_EXPORT_WRITE_IND: DWORD_PTR[0+R1.x], R0, ELEM_SIZE(3) END_OF_PROGRAM

0 Likes
1 Reply
ryta1203
Journeyman III

Nevermind, realized that the output needs to be in float format first... so

"itof r6.x, r6x.\n"

should be added before the output instruction.

0 Likes