Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | 6094 - new 'compute-offset' instruction | Kartik Agaram | 2020-03-07 | 1 | -3/+11 | |
| | | | | | | | | | | | | | | | | | | | | | | | If indexing into a type with power-of-2-sized elements we can access them in one instruction: x/reg1: (addr int) <- index A/reg2: (addr array int), idx/reg3: int This translates to a single instruction because x86 instructions support an addressing mode with left-shifts. For non-powers-of-2, however, we need a multiply. To keep things type-safe, it is performed like this: x/reg1: (offset T) <- compute-offset A: (addr array T), idx: int y/reg2: (addr T) <- index A, x An offset is just an int that is guaranteed to be a multiple of size-of(T). Offsets can only be used in index instructions, and the types will eventually be required to line up. In the process, I have to expand Input-size because mu.subx is growing big. | |||||
* | 6060 | Kartik Agaram | 2020-02-27 | 1 | -11/+11 | |
| | ||||||
* | 6059 | Kartik Agaram | 2020-02-27 | 1 | -0/+8 | |
| | ||||||
* | 6041 - array indexing starting to work | Kartik Agaram | 2020-02-21 | 1 | -0/+10 | |
| | | | | | | | | | | | | | And we're using it now in factorial.mu! In the process I had to fix a couple of bugs in pointer dereferencing. There are still some limitations: a) Indexing by a literal doesn't work yet. b) Only arrays of ints supported so far. Looking ahead, I'm not sure how I can support indexing arrays by non-literals (variables in registers) unless the element size is a power of 2. | |||||
* | 6039 | Kartik Agaram | 2020-02-21 | 1 | -0/+18 | |
| | ||||||
* | 6019 - finish supporting all branch primitives | Kartik Agaram | 2020-02-18 | 1 | -2/+2 | |
| | | | | | | | | I'd been thinking I didn't need unconditional `break` instructions, but I just realized that non-local unconditional breaks have a use. Stop over-thinking this, just support everything. The code is quite duplicated. | |||||
* | 5968 | Kartik Agaram | 2020-02-01 | 1 | -24/+22 | |
| | ||||||
* | 5967 | Kartik Agaram | 2020-02-01 | 1 | -0/+6 | |
| | ||||||
* | 5966 - document all supported Mu instructions | Kartik Agaram | 2020-01-31 | 1 | -0/+186 | |