1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 09:39:03 -08:00
Commit graph

138 commits

Author SHA1 Message Date
5aa0b5abe1 added 'unsafe' option to not wrap execution in pcall 2015-11-24 17:06:38 -08:00
d1edcf4fab add line numbers to Dumper errors 2015-11-24 17:00:44 -08:00
32368f3998 optimize LI/LA 2015-11-24 16:34:18 -08:00
89fcdd825d be more strict with immediate sizes
this will be made up for by pseudo-instructions in due time.
2015-11-24 16:25:05 -08:00
338685d5bc fix a couple coprocessor instructions 2015-11-24 13:34:24 -08:00
bd0c5f4b34 implement align and skip directives 2015-11-24 13:23:22 -08:00
9a2335fab1 a little more info 2015-11-23 20:42:19 -08:00
2694035873 cleanup and documenting; alias S8 register to FP 2015-11-23 14:16:31 -08:00
3590093470 fix line number in 'undefined define' error 2015-11-23 13:13:54 -08:00
bead0e5576 brain fart 2015-11-22 14:00:17 -08:00
bc72559091 rename; readme 2015-11-22 13:58:29 -08:00
c508c6efd9 move assembler to its own repo 2015-11-22 13:50:44 -08:00
e15d699ac3 ignore highest bit of .org directive
are you *really* gonna be assembling files over 2GiB?
2015-11-22 13:49:12 -08:00
e31b73d34e handle immediates in place of most offsets 2015-11-22 13:49:10 -08:00
25b0ade37a reimplement parsing; resolve defines after lexing 2015-11-22 13:49:09 -08:00
92c5819e3f tokenize all at once (WIP) 2015-11-22 13:49:08 -08:00
d560f47be9 unfudge LI/LA a little 2015-11-22 13:49:06 -08:00
009d7080a4 use proper instruction type names 2015-11-22 13:49:05 -08:00
6fc3b8f2b5 add reg# register aliases 2015-11-22 13:49:03 -08:00
4a6c7c4d09 pseudo-instruction crap 2015-11-22 13:49:01 -08:00
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
327f38cbbc implement LI and LA 2015-11-22 13:48:58 -08:00
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
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
e3f882f986 simplify size handling 2015-11-22 13:48:54 -08:00
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
e6d34bdb0b only specify one instruction list 2015-11-22 13:48:51 -08:00
2d8aabc311 add remaining fp instructions 2015-11-22 13:48:49 -08:00
e07d3f04e8 add fp compare instructions 2015-11-22 13:48:48 -08:00
5da1b19fd5 use filename in errors; fix JALR 2015-11-22 13:48:46 -08:00
4646d467d2 set up as a proper module 2015-11-22 13:48:45 -08:00
96a11a0114 refactor to use classes; no hardcoded stuff 2015-11-22 13:48:43 -08:00
8e9ffba103 implement relative branches; fix register orders 2015-11-22 13:48:42 -08:00
1b689368d8 a little cleanup 2015-11-22 13:48:41 -08:00
846f611001 add basic fp arithmetic 2015-11-22 13:48:39 -08:00
4c7f744dc0 add fpu registers and basic moves 2015-11-22 13:48:38 -08:00
f302543b2d recognize pseudo & fp instructions
i hope this is all of them.
2015-11-22 13:48:36 -08:00
0509f587ba add semi-functional MIPS assembler 2015-11-22 13:44:48 -08:00