Skip to content

Commit

Permalink
Remove typedef wrappers around structs
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 23, 2014
1 parent fc33c68 commit 22229c1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/iasm.c
Expand Up @@ -65,7 +65,7 @@
#define ADDFWAIT() 0

// Additional tokens for the inline assembler
typedef enum
enum ASMTK
{
ASMTKlocalsize = TOKMAX + 1,
ASMTKdword,
Expand All @@ -78,7 +78,7 @@ typedef enum
ASMTKseg,
ASMTKword,
ASMTKmax = ASMTKword-(TOKMAX+1)+1
} ASMTK;
};

static const char *apszAsmtk[ASMTKmax] =
{
Expand Down Expand Up @@ -132,14 +132,14 @@ void init_optab();

static unsigned char asm_TKlbra_seen = FALSE;

typedef struct
struct REG
{
char regstr[6];
unsigned char val;
opflag_t ty;

bool isSIL_DIL_BPL_SPL();
} REG;
};

static REG regFp = { "ST", 0, _st };

Expand Down Expand Up @@ -388,15 +388,15 @@ bool REG::isSIL_DIL_BPL_SPL()
(val == _SPL && strcmp(regstr, "SPL") == 0));
}

typedef enum
enum ASM_JUMPTYPE
{
ASM_JUMPTYPE_UNSPECIFIED,
ASM_JUMPTYPE_SHORT,
ASM_JUMPTYPE_NEAR,
ASM_JUMPTYPE_FAR
} ASM_JUMPTYPE; // ajt
}; // ajt

typedef struct opnd
struct OPND
{
REG *base; // if plain register
REG *pregDisp1; // if [register1]
Expand All @@ -414,11 +414,11 @@ typedef struct opnd
Type *ptype;
ASM_JUMPTYPE ajt;

opnd()
OPND()
{
memset(this, 0, sizeof(opnd));
memset(this, 0, sizeof(OPND));
}
} OPND;
};

//
// Exported functions called from the compiler
Expand Down Expand Up @@ -2393,7 +2393,7 @@ static void asm_make_modrm_byte(
{
#undef modregrm

typedef union
union MODRM_BYTE
{
unsigned char uchOpcode;
struct
Expand All @@ -2402,9 +2402,9 @@ static void asm_make_modrm_byte(
unsigned reg : 3;
unsigned mod : 2;
} modregrm;
} MODRM_BYTE; // mrmb
}; // mrmb

typedef union
union SIB_BYTE
{
unsigned char uchOpcode;
struct
Expand All @@ -2413,7 +2413,7 @@ static void asm_make_modrm_byte(
unsigned index : 3;
unsigned ss : 2;
} sib;
} SIB_BYTE;
};


MODRM_BYTE mrmb = { 0 };
Expand Down

0 comments on commit 22229c1

Please sign in to comment.