about summary refs log tree commit diff stats
path: root/apps/desugar
Commit message (Collapse)AuthorAgeFilesLines
* desugar: code-generation seems completeKartik Agaram2019-08-251-0/+0
|
* desugar: parsing seems completeKartik Agaram2019-08-251-0/+0
|
* parsing *(reg-disp)Kartik Agaram2019-08-251-0/+0
|
* parsing *(reg+reg)Kartik Agaram2019-08-251-0/+0
| | | | | | | | | Turns out there's an ambiguity even in this simple one-line language: when you see 'base+' you don't know whether the next token is the index or displacement. (Whereas a '-' would be unambiguous but is still not handled.) Fixing this ambiguity adds 15 instructions worth of complexity.
* parsing *(reg+disp)Kartik Agaram2019-08-241-0/+0
|
* integration tests for desugaring indirect modeKartik Agaram2019-08-241-0/+0
| | | | They caught a logic error.
* integration tests for desugaring direct modeKartik Agaram2019-08-241-0/+0
|
* use the results of parsing in emit-indirect-modeKartik Agaram2019-08-241-0/+0
|
* parsing *(reg)Kartik Agaram2019-08-241-0/+0
|
* build out all variants for skipping whitespaceKartik Agaram2019-08-241-0/+0
| | | | skip {whitespace, non-whitespace} x {from stream, from slice}
* .Kartik Agaram2019-08-231-0/+0
|
* .Kartik Agaram2019-08-231-0/+0
| | | | | Some reorg as I realize I may have painted myself into a corner in this function. I have no registers left for the actual parsing.
* parsing *regKartik Agaram2019-08-231-0/+0
| | | | Isn't used yet, but baby steps.
* another error messageKartik Agaram2019-08-231-0/+0
|
* lexing complex expressions inside '*(...)'Kartik Agaram2019-08-231-0/+0
|
* couple of helpers for parsing expressions in parensKartik Agaram2019-08-221-0/+0
|
* sketch of a plan to implement indirect modeKartik Agaram2019-08-161-0/+0
|
* desugar: code-generate *regKartik Agaram2019-08-161-0/+0
|
* plan for supporting indirect modeKartik Agaram2019-08-161-0/+0
| | | | | | | | | | | It may superficially seem like there's a simpler approach: - emit '3/mod' or '0/mod' depending on whether the character is '%' or '*' - increment the start of word-slice - look up the register and emit the appropriate /rm32 But that won't work for 1/mod or 2/mod. We're doing a little bit of upfront planning.
* add desugar to CIKartik Agaram2019-08-131-0/+0
|
* get desugar working on the commandlineKartik Agaram2019-08-131-0/+0
|
* .Kartik Agaram2019-08-131-0/+0
|
* new variant: maybe-get-sliceKartik Agaram2019-08-131-0/+0
|
* new variant: maybe-get returns null on failureKartik Agaram2019-08-121-0/+0
|
* better error message when get abortsKartik Agaram2019-08-121-0/+0
|
* table-based register conversionKartik Agaram2019-08-011-0/+0
| | | | | | | Requires a change to the C++ translator: support string literals in all segments, not just the code segment. (The self-hosted translator already had this.)
* .Kartik Agaram2019-08-011-0/+0
| | | | | First step to cleaning up `desugar-register`: extract the common '%' to register literals.
* desugar: code-generate %regKartik Agaram2019-07-311-0/+0
| | | | | We're no longer just emitting the register code. We emit all arguments with appropriate metadata.
* desugar: clean up top-level `convert`Kartik Agaram2019-07-311-0/+0
Model it on `dquotes` rather than `pack`, since it needs almost zero state across words. Manual testing: $ echo 'ab %eax' |subx run apps/desugar ab 0