1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-05-16 15:23:24 -07:00
Commit Graph

182 Commits

Author SHA1 Message Date
Connor Olding 9a2335fab1 a little more info 2015-11-23 20:42:19 -08:00
Connor Olding 2694035873 cleanup and documenting; alias S8 register to FP 2015-11-23 14:16:31 -08:00
Connor Olding 3590093470 fix line number in 'undefined define' error 2015-11-23 13:13:54 -08:00
Connor Olding bead0e5576 brain fart 2015-11-22 14:00:17 -08:00
Connor Olding bc72559091 rename; readme 2015-11-22 13:58:29 -08:00
Connor Olding c508c6efd9 move assembler to its own repo 2015-11-22 13:50:44 -08:00
Connor Olding e15d699ac3 ignore highest bit of .org directive
are you *really* gonna be assembling files over 2GiB?
2015-11-22 13:49:12 -08:00
Connor Olding e31b73d34e handle immediates in place of most offsets 2015-11-22 13:49:10 -08:00
Connor Olding 25b0ade37a reimplement parsing; resolve defines after lexing 2015-11-22 13:49:09 -08:00
Connor Olding 92c5819e3f tokenize all at once (WIP) 2015-11-22 13:49:08 -08:00
Connor Olding d560f47be9 unfudge LI/LA a little 2015-11-22 13:49:06 -08:00
Connor Olding 009d7080a4 use proper instruction type names 2015-11-22 13:49:05 -08:00
Connor Olding 6fc3b8f2b5 add reg# register aliases 2015-11-22 13:49:03 -08:00
Connor Olding 4a6c7c4d09 pseudo-instruction crap 2015-11-22 13:49:01 -08:00
Connor Olding 57ca41d414 various
fix jump and branch destinations.
note: branching is no longer compatible with CajeASM.

make LUI dumb: only use 'UPPER' with LI/LA.
note: this is very incompatible with CajeASM.
add LUUI pseudo-instruction to use 'UPPER' instead of 'LOWER'.

fix SUBI/SUBIU parsing.

fix LI for values under 0x10000.

pass filename through main().
tell Lexer our filename.
don't print filename in Dumper since it's irrelevant.
2015-11-22 13:48:59 -08:00
Connor Olding 327f38cbbc implement LI and LA 2015-11-22 13:48:58 -08:00
Connor Olding b3e481301e various
alias ZERO register to R0.
lex decimal numbers properly.
lex octal and negative numbers.
lex directives properly.
fix byte dumping.
fix UPPER behavior...?
2015-11-22 13:48:56 -08:00
Connor Olding d5dd709cb0 new dumper to support directives
the old one could still have a place,
with its simplicity and speed.
also, screw versioning.
2015-11-22 13:48:55 -08:00
Connor Olding e3f882f986 simplify size handling 2015-11-22 13:48:54 -08:00
Connor Olding 724e044288 define formats in the instruction table
this greatly reduces code bloat,
and made it easier to implement a few instructions.
everything is still very untested, however.
2015-11-22 13:48:52 -08:00
Connor Olding e6d34bdb0b only specify one instruction list 2015-11-22 13:48:51 -08:00
Connor Olding 2d8aabc311 add remaining fp instructions 2015-11-22 13:48:49 -08:00
Connor Olding e07d3f04e8 add fp compare instructions 2015-11-22 13:48:48 -08:00
Connor Olding 5da1b19fd5 use filename in errors; fix JALR 2015-11-22 13:48:46 -08:00
Connor Olding 4646d467d2 set up as a proper module 2015-11-22 13:48:45 -08:00
Connor Olding 96a11a0114 refactor to use classes; no hardcoded stuff 2015-11-22 13:48:43 -08:00
Connor Olding 8e9ffba103 implement relative branches; fix register orders 2015-11-22 13:48:42 -08:00
Connor Olding 1b689368d8 a little cleanup 2015-11-22 13:48:41 -08:00
Connor Olding 846f611001 add basic fp arithmetic 2015-11-22 13:48:39 -08:00
Connor Olding 4c7f744dc0 add fpu registers and basic moves 2015-11-22 13:48:38 -08:00
Connor Olding f302543b2d recognize pseudo & fp instructions
i hope this is all of them.
2015-11-22 13:48:36 -08:00
Connor Olding 0509f587ba add semi-functional MIPS assembler 2015-11-22 13:44:48 -08:00