summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim/ptx.l')
-rw-r--r--src/cuda-sim/ptx.l8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l
index ab640d7..d4bf631 100644
--- a/src/cuda-sim/ptx.l
+++ b/src/cuda-sim/ptx.l
@@ -36,7 +36,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ptx.tab.h"
#include <string.h>
-char linebuf[4096];
+#define LINEBUF_SIZE (64*1024)
+char linebuf[LINEBUF_SIZE];
unsigned col = 0;
#define TC col+=strlen(ptx_text);
#define CHECK_UNSIGNED \
@@ -81,6 +82,7 @@ cos TC; ptx_lval.int_value = COS_OP; return OPCODE;
cvt TC; ptx_lval.int_value = CVT_OP; return OPCODE;
cvta TC; ptx_lval.int_value = CVTA_OP; return OPCODE;
div TC; ptx_lval.int_value = DIV_OP; return OPCODE;
+dp4a TC; ptx_lval.int_value = DP4A_OP; return OPCODE;
ex2 TC; ptx_lval.int_value = EX2_OP; return OPCODE;
exit TC; ptx_lval.int_value = EXIT_OP; return OPCODE;
fma TC; ptx_lval.int_value = FMA_OP; return OPCODE;
@@ -185,6 +187,7 @@ breakaddr TC; ptx_lval.int_value = BREAKADDR_OP; return OPCODE;
\.file TC; BEGIN(INITIAL); return FILE_DIRECTIVE;
\.func TC; BEGIN(IN_FUNC_DECL); return FUNC_DIRECTIVE; // blocking opcode parsing in case the function has the same name as an opcode (e.g. sin(), cos())
\.global TC; return GLOBAL_DIRECTIVE;
+\.global.volatile TC; return GLOBAL_DIRECTIVE; //TODO: fix this!
\.local TC; return LOCAL_DIRECTIVE;
\.loc TC; return LOC_DIRECTIVE;
\.maxnctapersm TC; return MAXNCTAPERSM_DIRECTIVE;
@@ -257,6 +260,7 @@ breakaddr TC; ptx_lval.int_value = BREAKADDR_OP; return OPCODE;
\.u32 TC; return U32_TYPE;
\.u64 TC; return U64_TYPE;
\.f16 TC; return F16_TYPE;
+\.f16x2 TC; return F16_TYPE; /* TODO: figure out what this should really be */
\.f32 TC; return F32_TYPE;
\.f64 TC; return F64_TYPE;
\.ff64 TC; return FF64_TYPE;
@@ -406,7 +410,7 @@ breakaddr TC; ptx_lval.int_value = BREAKADDR_OP; return OPCODE;
"//"[^\n]* TC; // eat single
-\n.* col=0; strncpy(linebuf, yytext + 1, sizeof(linebuf)); yyless( 1 );
+\n.* col=0; strncpy(linebuf, yytext + 1, LINEBUF_SIZE); yyless( 1 );
" " TC;
"\t" TC;