Michael Buesch 67f1896697 b43-asm: const-ify yyerror() argument 11 jaren geleden
..
.gitignore 24bd771600 Update .gitignore 14 jaren geleden
COPYING b9e19faa25 Initial commit. 17 jaren geleden
Makefile 62ac5a230d b43-asm: fix compile error: undefined reference to `yydebug' 11 jaren geleden
README d06bbc1f60 b43-asm: Add new instructions to README 13 jaren geleden
args.c 41859f7435 Update my e-mail address 13 jaren geleden
args.h b756ecc447 assembler: Put commandline args into structure 14 jaren geleden
b43-asm 41859f7435 Update my e-mail address 13 jaren geleden
initvals.c 41859f7435 Update my e-mail address 13 jaren geleden
initvals.h 949f7affad b43-asm: Add tram keyword for writing to template ram 16 jaren geleden
list.h b9e19faa25 Initial commit. 17 jaren geleden
main.c 62ac5a230d b43-asm: fix compile error: undefined reference to `yydebug' 11 jaren geleden
main.h d1a8976fac assembler: Add support for raw output format 14 jaren geleden
parser.y 67f1896697 b43-asm: const-ify yyerror() argument 11 jaren geleden
scanner.l a392db7779 b43-asm, b43-dasm: Add 5 new instructions. 13 jaren geleden
selftest.sh b231b08309 asm/dasm: Update selftest to support r15 arch 14 jaren geleden
test.asm a392db7779 b43-asm, b43-dasm: Add 5 new instructions. 13 jaren geleden
util.c 41859f7435 Update my e-mail address 13 jaren geleden
util.h 7ca8f23776 Assembler: Fix CPP lineinfo interpreter 14 jaren geleden

README

===============================================================================
== Instruction Set Summary for the core revision >= 5 microcode ==
===============================================================================


===============================================================================
Mnemonics | Operands | Description | Operation
===============================================================================

Arithmetic and logic instructions:
add | A,B,rD | Add | rD=A+B
add. | A,B,rD | Add, set Carry | rD=A+B SaveCarry
addc | A,B,rD | Add with Carry | rD=A+B+Carry
addc. | A,B,rD | Add with Carry, set Carry | rD=A+B+C SaveCarry
sub | A,B,rD | Subtract | rD=A-B
sub. | A,B,rD | Sub, set Carry | rD=A-B SaveCarry
subc | A,B,rD | Sub with Carry | rD=A-B-Carry
subc. | A,B,rD | Sub with Carry, set Carry | rD=A-B-C SaveCarry
mul | A,B,rD | multiply (rev 11+ only) | spr06d=lsb; rD=msb

Branch instructions:
jmp | l | Uncond. jump (virtual instr.) | PC=l
jand | A,B,l | Jump if binary AND | if(A&B) PC=l
jnand | A,B,l | Jump if not binary AND | if(!(A&B)) PC=l
js | A,B,l | Jump if all bits set | if((A&B)==A) PC=l
jns | A,B,l | Jump if not all bits set | if((A&B)!=A) PC=l
je | A,B,l | Jump if equal | if(A==B) PC=l
jne | A,B,l | Jump if not equal | if(A!=B) PC=l
jls | A,B,l | Jump if less (signed) | if(Ajges | A,B,l | Jump if greater or equal (sign.)| if(A>=B) PC=l
jgs | A,B,l | Jump if greater (signed) | if(A>B) PC=l
jles | A,B,l | Jump if less or equal (signed) | if(A<=B) PC=l
jl | A,B,l | Jump if less | if(Ajge | A,B,l | Jump if greater or equal | if(A>=B) PC=l
jg | A,B,l | Jump if greater | if(A>B) PC=l
jle | A,B,l | Jump if less or equal | if(A<=B) PC=l
jdn | A,B,l | Jump if diff is < 0, no carry | if(nc(A-B)<0) PC=l
jdpz | A,B,l | Jump if diff is >= 0, no carry | if(nc(A-B)>=0) PC=l
jdp | A,B,l | Jump if diff is > 0, no carry | if(nc(A-B)>0) PC=l
jdnz | A,B,l | Jump if diff is <= 0, no carry | if(nc(A-B)<=0) PC=l
call | lrX,l | Store PC, call function | lrX=PC; PC=l
calls | l | Store PC, call function | PC->stack; PC=l
ret | lrX,lrY | Store PC, ret from func | lrX=PC; PC=lrY
rets | | ret from function | stack->PC
jzx | M,S,A,B,l | Jump if zero after shift + mask |
jnzx | M,S,A,B,l | Jump if nonzero after shift+msk |
jext | E,A,B,l | Jump if External Condition true | if(E) PC=l
jnext | E,A,B,l | Jump if External Condition false| if(!E) PC=l

Data transfer instructions:
mov | A,rD | Copy data (virtual instruction) | rD=A
tkiph | A,rD | TKIP S-Box lookup high | rD=SBOX[hi8(A)]
tkiphs | A,rD | TKIP S-Box lkup hi swap'd | rD=byteswap(tkiph)
tkipl | A,rD | TKIP S-Box lookup low | rD=SBOX[lo8(A)]
tkipls | A,rD | TKIP S-Box lkup lo swap'd | rD=byteswap(tkipl)

Bitwise instructions:
sra | A,B,rD | Arithmetic rightshift | rD=A>>B fillup sign
or | A,B,rD | Bitwise OR | rD=A|B
and | A,B,rD | Bitwise AND | rD=A&B
xor | A,B,rD | Bitwise XOR | rD=A^B
sr | A,B,rD | Rightshift | rD=A>>B
sl | A,B,rD | Leftshift | rD=A<srx | M,S,A,B,rD | Shift right over two registers | See detailed docs
rl | A,B,rD | Rotate left | rD=lrot(A, B bits)
rr | A,B,rD | Rotate right | rD=rrot(A, B bits)
nand | A,B,rD | Clear bits (notmask+and) | rD=A&(~B)
orx | M,S,A,B,rD | OR with shift and select | See detailed docs

Other instructions:
nap | none | Sleep until event | See detailed docs



Description of Operands:

rD = Destination Register (GPR or SPR)
A = Source Register (GPR or SPR) or Immediate
B = Source Register (GPR or SPR) or Immediate
M = Mask
S = Shift
E = External Condition
l = Branch label or address
lrX = Link Register (lr0 - lr3)
lrY = Link Register (lr0 - lr3)


Raw instruction format:
@bitcode_in_hexadecimal
Example: @1C0 @C11,@C22,r3


Virtual instructions are translated by the assembler to other
lowlevel instructions.


Please also see the detailed microcode documentation at:
http://bcm-v4.sipsolutions.net/802.11/Microcode