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

172 Commits

Author SHA1 Message Date
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