From 905e94f058d4127e7ed598a0ad2e0125aff4a6f0 Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Fri, 6 Aug 2010 12:46:01 +0000 Subject: [PATCH] gas2ack filters out .code16 - .code16 tells gnu as to generate 16bit assembly ack requires -mi86 switch --- commands/gas2ack/asm86.h | 1 + commands/gas2ack/emit_ack.c | 2 ++ commands/gas2ack/parse_gnu.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/commands/gas2ack/asm86.h b/commands/gas2ack/asm86.h index 80a1b2857..a7cea6ac2 100644 --- a/commands/gas2ack/asm86.h +++ b/commands/gas2ack/asm86.h @@ -10,6 +10,7 @@ typedef enum opcode { /* 80486 opcodes, from the i486 reference manual. DOT_ASSERT, /* Pseudo's invented */ DOT_BASE, DOT_COMM, DOT_LCOMM, + DOT_CODE16, DOT_DATA1, DOT_DATA2, DOT_DATA4, diff --git a/commands/gas2ack/emit_ack.c b/commands/gas2ack/emit_ack.c index dac676da3..c9d297d30 100644 --- a/commands/gas2ack/emit_ack.c +++ b/commands/gas2ack/emit_ack.c @@ -562,6 +562,8 @@ void ack_emit_instruction(asm86_t *a) assert(a->args->operator == '='); ack_printf("\t%s = ", a->args->name); ack_put_expression(a, a->args->middle, 0); + } else if (a->opcode == DOT_CODE16) { + /* nothing to be done, makefiles handle this */ } else if ((p= opcode2name(a->opcode)) != nil) { char *sep= dialect == ACK ? "" : ";"; diff --git a/commands/gas2ack/parse_gnu.c b/commands/gas2ack/parse_gnu.c index a3597659e..b137e6008 100644 --- a/commands/gas2ack/parse_gnu.c +++ b/commands/gas2ack/parse_gnu.c @@ -33,6 +33,7 @@ static mnemonic_t mnemtab[] = { { ".base", DOT_BASE, PSEUDO }, { ".bss", DOT_BSS, PSEUDO }, { ".byte", DOT_DATA1, PSEUDO }, + { ".code16", DOT_CODE16, PSEUDO }, { ".comm", DOT_COMM, PSEUDO }, { ".data", DOT_DATA, PSEUDO }, { ".end", DOT_END, PSEUDO }, @@ -883,6 +884,8 @@ static asm86_t *gnu_get_statement(void) case JMP: case CALL: break; + case DOT_CODE16: + break; default:; } skip_token(n+1);