summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-07-17 00:06:40 -0800
committerTor Aamodt <[email protected]>2010-07-17 00:06:40 -0800
commitb6661da800739b0fca9e01ba6d5afaca4f286d84 (patch)
tree1ae2883b6a75476bae851abf2fac20619a2afb5c /src/cuda-sim/ptx.l
parentd67e0e6d7c50a5c6f567e387e17782f022553264 (diff)
- bug fix: parsing hex int constants didn't have a-fA-F!?!
- modify template to use printf from kernel (this works on our Fermi card--want it working on simulator for debugging) - add support for extern function declarations (so don't try to assemble them)... printf is extern [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6862]
Diffstat (limited to 'src/cuda-sim/ptx.l')
-rw-r--r--src/cuda-sim/ptx.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l
index 0d66bfd..9e45bc3 100644
--- a/src/cuda-sim/ptx.l
+++ b/src/cuda-sim/ptx.l
@@ -225,7 +225,7 @@ xor TC; ptx_lval.int_value = XOR_OP; return OPCODE;
[0-9]+\.[0-9]+ TC; sscanf(yytext,"%lf", &ptx_lval.double_value); return DOUBLE_OPERAND;
-0[xX][0-9]+U? TC; CHECK_UNSIGNED; sscanf(yytext,"%x", &ptx_lval.int_value); return INT_OPERAND;
+0[xX][0-9a-fA-F]+U? TC; CHECK_UNSIGNED; sscanf(yytext,"%x", &ptx_lval.int_value); return INT_OPERAND;
0[0-7]+U? TC; printf("GPGPU-Sim: ERROR ** parsing octal not (yet) implemented\n"); abort(); return INT_OPERAND;
0[bB][01]+U? TC; printf("GPGPU-Sim: ERROR ** parsing binary not (yet) implemented\n"); abort(); return INT_OPERAND;
[-]?[0-9]+U? TC; CHECK_UNSIGNED; ptx_lval.int_value = atoi(yytext); return INT_OPERAND;