about summary refs log tree commit diff stats
path: root/036labels.cc
Commit message (Collapse)AuthorAgeFilesLines
* 7842 - new directory organizationKartik K. Agaram2021-03-031-429/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baremetal is now the default build target and therefore has its sources at the top-level. Baremetal programs build using the phase-2 Mu toolchain that requires a Linux kernel. This phase-2 codebase which used to be at the top-level is now under the linux/ directory. Finally, the phase-2 toolchain, while self-hosting, has a way to bootstrap from a C implementation, which is now stored in linux/bootstrap. The bootstrap C implementation uses some literate programming tools that are now in linux/bootstrap/tools. So the whole thing has gotten inverted. Each directory should build one artifact and include the main sources (along with standard library). Tools used for building it are relegated to sub-directories, even though those tools are often useful in their own right, and have had lots of interesting programs written using them. A couple of things have gotten dropped in this process: - I had old ways to run on just a Linux kernel, or with a Soso kernel. No more. - I had some old tooling for running a single test at the cursor. I haven't used that lately. Maybe I'll bring it back one day. The reorg isn't done yet. Still to do: - redo documentation everywhere. All the README files, all other markdown, particularly vocabulary.md. - clean up how-to-run comments at the start of programs everywhere - rethink what to do with the html/ directory. Do we even want to keep supporting it? In spite of these shortcomings, all the scripts at the top-level, linux/ and linux/bootstrap are working. The names of the scripts also feel reasonable. This is a good milestone to take stock at.
* 7455Kartik Agaram2020-12-281-2/+15
| | | | | | | | | | New approach to disambiguating /disp32 arguments: based on opcodes rather than metadata. I interpret /disp32 as PC-relative in a short list of instructions. Otherwise it's absolute if it gets a label. There should be no reason to pass labels into /disp8 or /disp16.
* 7454Kartik Agaram2020-12-281-3/+0
| | | | Go back to commit 7448.
* 7449Kartik Agaram2020-12-281-0/+3
| | | | | | | | | | | | | | | | | | | | There's an ambiguity in how x86 interprets disp32 fields: - For jumps and calls they're displacements from the starting address of the next instruction. So far so good. - However, when the ModR/M requires them they can also be absolute addresses. Ideally I'd take the presence of the ModR/M byte into account in interpreting them. However, it's easier to assume relative addressing only for labels in the code segment. This commit raises an error if we ever refer to labels in the code segment in instructions with a ModR/M byte. (I'm assuming that no instruction with a ModR/M byte will ever use a displacement without the ModR/M byte requiring it.)
* 6887Kartik Agaram2020-09-271-13/+13
| | | | | subx.md distinguishes between operands and arguments. Let's use that terminology more consistently in the sources.
* 5892Kartik Agaram2020-01-141-1/+1
|
* 5865Kartik Agaram2020-01-021-4/+4
| | | | Give the bootstrap C++ program a less salient name.
* 5670Kartik Agaram2019-09-191-0/+416