20 Commits

Author SHA1 Message Date
Homer Hsing
73ab2f6a68 Fix a typo in src/main.c: "in unit of type" -> "in unit of byte" 2013-03-04 15:54:32 +00:00
Homer Hsing
7186723f81 Reduce hash value collision probability in src/main.c
Original code use "hash_value = *name++", which may produce
hash value collision for word permutations like "abc", "bac" and "cba".
2013-03-04 15:54:32 +00:00
Homer Hsing
940522588a Move program_defaults init statement into variable declaration
In original code, the init value for "program_defaults.register_type"
is put inside main(), which may be hard to maintain.
2013-03-04 15:54:31 +00:00
Homer Hsing
77dcc41cfd Better comment text. Change "c like" to "C style" in main.c 2013-03-04 15:54:31 +00:00
Homer Hsing
aab7cd5cc5 close File yyin before calling yylex_destroy
This patch makes sure file handler yyin is closed.
yylex_destroy() calls yy_init_globals(), which reset yyin to 0.
Therefore if we do not close yyin before yylex_destroy(), yyin
will not be closed anymore.
2013-03-04 15:54:30 +00:00
Homer Hsing
31401afe78 Call yylex_destroy() to free memory after yyparse() 2013-03-04 15:54:30 +00:00
Homer Hsing
302ca73198 Close input file handler yyin after yyparse 2013-03-04 15:54:30 +00:00
Homer Hsing
f282ea689b Fix a typo ... lable -> label 2013-03-04 15:54:30 +00:00
Lu Guanqun
ea1fcf0b44 fix the label checking logics
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2013-03-04 15:54:30 +00:00
Xiang, Haihao
6fa6b45daf Add -g 7 for Ivybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:29 +00:00
Ben Widawsky
cbfab5f415 intel-gen4asm: have a C-like binary output
Have the assembler support a byte array output. This is useful for
writing blobs which can directly be linked code that wishes to upload to
the EU.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
27b4303a30 Support instructions which strictly follow the documents.
Previously some instructions parsed by this assembler don't follow the
documents.

Signed-off-by: Chen, Yangyang <yangyang.chen@intel.com>
Signed-off-by: Han, Haofu     <haofu.han@intel.com>
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:28 +00:00
Xiang, Haihao
95d0ce48f6 fix jump count for Sandybridge.
It is same as Ironlake.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
eb92c228cd add -g 6 for Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-03-04 15:54:27 +00:00
Xiang, Haihao
60cf6e09dd the offset of JMPI is in unit of 64bits on GEN5.
This fix is only applied for JMPI label. It is up to you
to use a right offset for JMPI imm32|reg in your program.
2013-03-04 15:54:26 +00:00
Xiang Haihao
549b751afb Add support for GEN5
Add a new option [-g n], n=4(GEN4),5(GEN5). If don't use -g,
the default value is 4(GEN4)
2013-03-04 15:54:26 +00:00
Zou Nanhai
be9bcee15f Add support for labeled and conditional branches
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-04 15:54:26 +00:00
Keith Packard
b81aca4948 Ensure that parse errors cause non-zero exit.
Also, avoid creating output file when a parse error occurs
2013-03-04 15:54:25 +00:00
Eric Anholt
713db8b220 More renaming of gen4asm -> intel-gen4asm, plus README update. 2013-03-04 15:54:25 +00:00
Eric Anholt
9b40c3724a Add autotools build system, and rearrange directory layout. 2013-03-04 15:54:23 +00:00