scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 65076a3a882385e4b0b1beb944d07286be7a78ad
parent c8cb140c6204646fba2f19a48e994582f24543c5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 28 Sep 2017 09:18:37 +0100

[as] Change direct to noargs

A direct address mode is when the address is explicit written in
the instruction. We were using direct for something totally
different, that was instructions without arguments, and for
this is better to use noargs

Diffstat:
Mas/ins.c | 2+-
Mas/target/x80/x80.dat | 74+++++++++++++++++++++++++++++++++++++-------------------------------------
Mas/target/x86/x86.dat | 4++--
3 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/as/ins.c b/as/ins.c @@ -4,7 +4,7 @@ static char sccsid[] = "@(#) ./as/ins.c"; #include "as.h" void -direct(Op *op, Node **args) +noargs(Op *op, Node **args) { emit(cursec, op->bytes, op->size); } diff --git a/as/target/x80/x80.dat b/as/target/x80/x80.dat @@ -14,40 +14,40 @@ .DQ imm64+ 0 none defq Z80,R800,GB80 .DEFQ imm64+ 0 none defq Z80,R800,GB80 .EQU imm16 0 none equ Z80,R800,GB80 -NOP none 1 0x00 direct Z80,R800,GB80 -EI none 1 0xfb direct Z80,R800,GB80 -DI none 1 0xf3 direct Z80,R800,GB80 -HALT none 1 0x76 direct Z80,R800,GB80 -SCF none 1 0x37 direct Z80,R800,GB80 -CCF none 1 0x3f direct Z80,R800,GB80 -NEG none 2 0xed,0x44 direct Z80,R800 -CPL none 1 0x2f direct Z80,R800,GB80 -DAA none 1 0x27 direct Z80,R800,GB80 -EI none 1 0xfb direct Z80,R800,GB80 -DI none 1 0xf3 direct Z80,R800,GB80 -HALT none 1 0x76 direct Z80,R800,GB80 -SCF none 1 0x37 direct Z80,R800,GB80 -RET none 1 0xc9 direct Z80,R800,GB80 -EXX none 1 0xd9 direct Z80,R800 -LDI none 2 0xed,0xa0 direct Z80,R800 -LDIR none 2 0xed,0xb0 direct Z80,R800 -LDD none 2 0xed,0xa8 direct Z80,R800 -LDDR none 2 0xed,0xb8 direct Z80,R800 -CPI none 2 0xed,0xa1 direct Z80,R800 -CPIR none 2 0xed,0xb1 direct Z80,R800 -CPD none 2 0xed,0xa9 direct Z80,R800 -CPDR none 2 0xed,0xb9 direct Z80,R800 -RLCA none 1 0x07 direct Z80,R800,GB80 -RLA none 1 0x17 direct Z80,R800,GB80 -RRCA none 1 0x0f direct Z80,R800,GB80 -RRA none 1 0x1f direct Z80,R800,GB80 -RLD none 2 0xed,0x6f direct Z80,R800 -RRD none 2 0xed,0x67 direct Z80,R800 -INI none 2 0xed,0xa2 direct Z80,R800 -INIR none 2 0xed,0xb2 direct Z80,R800 -IND none 2 0xed,0xaa direct Z80,R800 -INDR none 2 0xed,0xba direct Z80,R800 -OUTI none 2 0xed,0xa3 direct Z80,R800 -OTIR none 2 0xed,0xb3 direct Z80,R800 -OUTD none 2 0xed,0xab direct Z80,R800 -OTDR none 2 0xed,0xbb direct Z80,R800 +NOP none 1 0x00 noargs Z80,R800,GB80 +EI none 1 0xfb noargs Z80,R800,GB80 +DI none 1 0xf3 noargs Z80,R800,GB80 +HALT none 1 0x76 noargs Z80,R800,GB80 +SCF none 1 0x37 noargs Z80,R800,GB80 +CCF none 1 0x3f noargs Z80,R800,GB80 +NEG none 2 0xed,0x44 noargs Z80,R800 +CPL none 1 0x2f noargs Z80,R800,GB80 +DAA none 1 0x27 noargs Z80,R800,GB80 +EI none 1 0xfb noargs Z80,R800,GB80 +DI none 1 0xf3 noargs Z80,R800,GB80 +HALT none 1 0x76 noargs Z80,R800,GB80 +SCF none 1 0x37 noargs Z80,R800,GB80 +RET none 1 0xc9 noargs Z80,R800,GB80 +EXX none 1 0xd9 noargs Z80,R800 +LDI none 2 0xed,0xa0 noargs Z80,R800 +LDIR none 2 0xed,0xb0 noargs Z80,R800 +LDD none 2 0xed,0xa8 noargs Z80,R800 +LDDR none 2 0xed,0xb8 noargs Z80,R800 +CPI none 2 0xed,0xa1 noargs Z80,R800 +CPIR none 2 0xed,0xb1 noargs Z80,R800 +CPD none 2 0xed,0xa9 noargs Z80,R800 +CPDR none 2 0xed,0xb9 noargs Z80,R800 +RLCA none 1 0x07 noargs Z80,R800,GB80 +RLA none 1 0x17 noargs Z80,R800,GB80 +RRCA none 1 0x0f noargs Z80,R800,GB80 +RRA none 1 0x1f noargs Z80,R800,GB80 +RLD none 2 0xed,0x6f noargs Z80,R800 +RRD none 2 0xed,0x67 noargs Z80,R800 +INI none 2 0xed,0xa2 noargs Z80,R800 +INIR none 2 0xed,0xb2 noargs Z80,R800 +IND none 2 0xed,0xaa noargs Z80,R800 +INDR none 2 0xed,0xba noargs Z80,R800 +OUTI none 2 0xed,0xa3 noargs Z80,R800 +OTIR none 2 0xed,0xb3 noargs Z80,R800 +OUTD none 2 0xed,0xab noargs Z80,R800 +OTDR none 2 0xed,0xbb noargs Z80,R800 diff --git a/as/target/x86/x86.dat b/as/target/x86/x86.dat @@ -19,5 +19,5 @@ .EQU imm16 0 none equ BITS16 .EQU imm32 0 none equ BITS32 .EQU imm64 0 none equ BITS64 -NOP none 1 0x90 direct BITS16,BITS32,BITS64 -RET none 1 0xc3 direct BITS16,BITS32,BITS64 +NOP none 1 0x90 noargs BITS16,BITS32,BITS64 +RET none 1 0xc3 noargs BITS16,BITS32,BITS64