]> Zhao Yanbai Git Server - minix.git/commitdiff
gas2ack filters out .code16
authorTomas Hruby <tom@minix3.org>
Fri, 6 Aug 2010 12:46:01 +0000 (12:46 +0000)
committerTomas Hruby <tom@minix3.org>
Fri, 6 Aug 2010 12:46:01 +0000 (12:46 +0000)
- .code16 tells gnu as to generate 16bit assembly ack requires -mi86 switch

commands/gas2ack/asm86.h
commands/gas2ack/emit_ack.c
commands/gas2ack/parse_gnu.c

index 80a1b2857dd04220a3e6fa39737341c1d02841c4..a7cea6ac22e2c0dbccbb7d558997c57c280854ce 100644 (file)
@@ -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,
index dac676da3a575f7165aa0d4b70f43389b7f034eb..c9d297d30213b4346a7af46c3573b3fed71edace 100644 (file)
@@ -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 ? "" : ";";
index a3597659e57f88e3900f86b302fbfba22145af84..b137e6008e5630c4bd1361abd9bbe2f01ddea3e5 100644 (file)
@@ -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);