summaryrefslogtreecommitdiff
path: root/assembler/main.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-01-26 23:09:42 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:40 +0000
commitd70e9f824f6f837614bbc2714c5ccc5f77d2c539 (patch)
tree5e9563c8fa58b63e64a1d6d19ba7c437b45dc0bd /assembler/main.c
parente9172aa22538216cd434c700d78915ec06142238 (diff)
assembler: Add a check for when width is 1 and hstride is not 0
The list of region restrictions in bspec do say that we can't have: width == 1 && hstrize != 0 We do have plenty of assembly code that don't respect that behaviour. So let's hide the warning under a -W flag (for now) while we fix things. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'assembler/main.c')
-rw-r--r--assembler/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/assembler/main.c b/assembler/main.c
index cfee749a..4fe13156 100644
--- a/assembler/main.c
+++ b/assembler/main.c
@@ -43,6 +43,7 @@ extern int errors;
long int gen_level = 40;
int advanced_flag = 0; /* 0: in unit of byte, 1: in unit of data element size */
+unsigned int warning_flags = WARN_ALWAYS;
int binary_like_output = 0; /* 0: default output style, 1: nice C-style output */
int need_export = 0;
char *input_filename = "<stdin>";
@@ -293,7 +294,7 @@ int main(int argc, char **argv)
char o;
void *mem_ctx;
- while ((o = getopt_long(argc, argv, "e:l:o:g:ab", longopts, NULL)) != -1) {
+ while ((o = getopt_long(argc, argv, "e:l:o:g:abW", longopts, NULL)) != -1) {
switch (o) {
case 'o':
if (strcmp(optarg, "-") != 0)
@@ -344,6 +345,10 @@ int main(int argc, char **argv)
entry_table_file = optarg;
break;
+ case 'W':
+ warning_flags |= WARN_ALL;
+ break;
+
default:
usage();
exit(1);