| Age | Commit message (Collapse) | Author |
|
this adds an "execute" word, which makes execution tokens useful for something
it also builds "emitstring" on the heap, at runtime, to test that that
all works properly
Force-Push: yes
Change-Id: Ic59a489c0a035a4174db516aeef77e23c7d8528b
|
|
also, fix strlen to not include the null byte
Force-Push: yes
Change-Id: Ifd95da1fc0cf7006df0a25278e03651d6185f037
|
|
and a lot of other stuff necessary for that, as follows
implement the "adc" and "sbb" instructions in flatassembler (there's no Forth implementation of them yet)
implement "cmps8" in flatassembler; Forth already has a much more thorough suite of string instructions
add Forth jmp_rel_imm8 and flatassembler jmp.rel.bimm unconditional jumps. they're nver used, it just seems like they should exist.
split the disp8 case from the indirect case for the flatassembler implementation of register-to-register mov, to match how the Forth implementation works
fix the name of mov.disp8.qreg.qreg, which had been incorrectly named mov.qreg.disp8.qreg. it's never called anyway.
fix a citation for the MOV instruction; Intel's section numbers are confusing.
Force-Push: yeah
Change-Id: I53761a3487041c142ade1a82a8ab9a3f1129b853
|
|
in both repeatable and non-repeatable forms
no ins or outs though
Force-Push: yes
Change-Id: Ica93a1de8b3b698db4e9b3c3c2f00b9e145a2064
|
|
Force-Push: yes
Change-Id: Idbdfe11a5ba4107c90065f015705708030684439
|
|
Force-Push: yes
Change-Id: I45c0a5e729cae2493e341ad3b6145708826383ab
|
|
Force-Push: yes
Change-Id: I511c869c1f5a3c533213a8d3072dd586f29a5a1c
|
|
Force-Push: yes
Change-Id: I6e34fef69b8d254e215eb377f7a50df57190eed0
|
|
Force-Push: yes
Change-Id: Idf4fe951fa583946f0a51a53f15eff7f1138b7c6
|
|
Force-Push: yes
Change-Id: I56f82c56307a8e0cd20fdac38dd264136478dd60
|
|
some basic mistakes in those
Force-Push: yes
Change-Id: Ife797b31962c26fc8a8ab741f4d97bd3da3c0612
|
|
Force-Push: yes
Change-Id: I67f3a218ea3c0cbb362e2825adf200e7cca05edc
|
|
missed that instruction. oops. well, we have it now.
Force-Push: yes
Change-Id: I22583d6c6bda3cb66ad67a69a644aeb777114085
|
|
also fixed scalefield
the testing bar we're applying for these next changes is that it runs successfully, we aren't actually calling the generated funcions yet. we'll need to invent some methodology for checking they're generated correctly.
Force-Push: yes
Change-Id: I820e5671d74fa3bd4342e5d5b26b867e053ba3ca
|
|
Force-Push: yepppppp
Change-Id: I3afbaf2af5b2d31ba435fdad759117c7fb52c1d8
|
|
now there are stubs for all the basic words. we took this opportunity to do a pass on thinking about their "real" names :)
Force-Push: yes
Change-Id: If2c5b94c540a2a0b8e0df7650f6769405dae2ffd
|
|
it may not actually be any easier, but at the very least this is a readability improvement
Force-Push: yeah
Change-Id: I1ab991fc895e41af44f2aaac59d6152053bd9be3
|
|
this completes the assembly-in-Forth stuff! yay
Force-Push: yes
Change-Id: I7f9466a3a71375c32991379fc040d6cc3d657302
|
|
or at least, all the ones we need
yay
it's theoretically possible these work! it was a lot of details to get right, and they're not tested at all
Force-Push: config
Change-Id: I4f1bef007982af7901aa263af8e618d19e262f12
|
|
we're starting to feel vaguely proficient in stack juggling, but it will still be quite a thing if these don't need fixing later
Force-Push: yes
Change-Id: Ic1285d01cc42c6e8a30d36fc53e67135d8d9e175
|
|
also re-order "sib" to be before them
we were about to add one for indexed modes, and realized that really, these words are responsible for both the ModRM and SIB bytes, it's just that some modes only need one of them. this makes their responsibilities clearer, and as a bonus it draws a stronger distinction between these high-level words and the low-level "modrm", which omits consistency checking. having it called something else reduces the likelihood of inappropriately using the low-level one when a high-level one would be more suitable.
their names are a bit long now, but that's probably also good, it will incentivize building higher-level abstractions that define multiple variants of instructions rather than writing each one by hand. someday.
Force-Push: yes
Change-Id: Ia8f8fcc0e092f94e66f17a3fa55e8bf3e927fdff
|
|
Force-Push: yes
Change-Id: Ia9844da8f6e5d59ed77348b85200c28a7113bd1f
|
|
Force-Push: yes
Change-Id: Ib9efd1cd1c8b362547bef8b15829f9da6a28b4d1
|
|
Force-Push: yes
Change-Id: I19215825a8891bbc8b36bac03a0f0ca440721cb3
|
|
yay
that was hard. lots of bug-fixing. for some reason the condition code for not-equal was being output as 0x6 instead of 0x4. there was also a lot of stack manipulation to trace through very carefully.
Force-Push: yes
Change-Id: I8f2c19d5be96ba27a3e8c56c460c761a3b16666f
|
|
also a minor renaming for consistency
Force-Push: yes
Change-Id: I80f7a091272fa9a73cedd7caba495a45d5866d16
|
|
not used for anything yet, but hey
verifying this required a lot of time in the debugger
Force-Push: yes
Change-Id: I38a9536ce8efde236b1ed81ca94e0cf7e101413d
|
|
this better reflects the logical dependencies, per the new plan
Force-Push: yes
Change-Id: I2caa0e6bb1c722a7839f6695c48b05d0b2cfad25
|
|
Force-Push: yes
Change-Id: I7e4c678c27a87b79a9f2c2aad12bd65d7d5600cc
|
|
this will get more painful the longer we put it off
Force-Push: yes
Change-Id: I82430303d9d9d8a317eb8f020316e2145020a5c8
|
|
and the 0x in front of the 8 was silly
Force-Push: yes
Change-Id: I23a8ffd6aeec1d78ee7362c1f97d99e94947e5b6
|
|
and the heap bootstrapping strategy is explained, or part of it
Force-Push: yes
Change-Id: I4c48cf081709a7200a70041e321ace4d6713be94
|
|
and begin to grow the Forth-styled assembly language
it needs runtime word definition next, in our view, so we're checkpointing it here so as to work on that
Force-Push: yes
Change-Id: I08927581f6b6fdc69f6543936e46fe9ff83c8d48
|
|
they had some minor confusing stuff going on; now they don't
Force-Push: yes
Change-Id: Ie3756cf18222cb8b3f4794f57d91cb5229be715e
|
|
Force-Push: yes
Change-Id: I5709b96b401362564cc0f1dec3953dad13c319b7
|
|
this also adds a block-copy routine, further breaking up the handful of remaining monolithic things
Force-Push: yes
Change-Id: Ida960d83bab6176d016168cdf25e0763aa6050ef
|
|
yessssssss
that was a lot of debugging, wow. there were two bugs in UNROLL: the source and destination for the block move were set to the high end instead of the low end; and the encoding of an lea variant fell into an unsupported case but was emitted anyway due to an incorrect guard clause
that was seriously a lot of debugging. also all the stack logic for grabbing and stashing the label stuff was wrong several times, but it works now
the original "old code" is now fully eliminated, wow!
Force-Push: yeah
Change-Id: I85d951eabc7de6ba502e2a1aa0f5998f9b399765
|
|
also a couple more gdb tips
Force-Push: yes
Change-Id: I31038334449ea45238c811b4e97e2d87833d8ea6
|
|
this shaves like 700 bytes off the file size, though it feels like more should be achievable
Force-Push: yes
Change-Id: Iaa51c462cc80cea1a16a67b428b5064e40d9b9f1
|
|
wow, this sure does balloon the file size. must be something we can do about that...
Force-Push: yes
Change-Id: I477c4fdc9b42c3e5d50654d2864e3933da65a64d
|
|
implement indirect adds and subtracts; it turns out they're convenient for heap management
the operand order for lea.qreg.qreg.disp32 didn't match what the name suggested, so it's fixed now
the semantics of push.dimm are quite surprising, for reasons that are now extensively documented
also add notes on helpful ways to use gdb
Force-Push: yes
Change-Id: I717eb6427520e2c336586d4e8066ef172d97ce55
|
|
the goal is to make the assembly monolith, less of one. no individual piece of this is complicated, it was just tightly coupled... now it is less so.
Force-Push: yes
Change-Id: I4bf5711ee6eae18e68be9d4e1f5107933c45fbbd
|
|
Force-Push: yes
Change-Id: I5587783da20301abf11489caad6990531b13e3f1
|
|
this is all untested, but I'm highly confident in my reading of the Intel manual at this point
Force-Push: yes
Change-Id: I3dbd59da02994db58f2a53d1890136d583803bc6
|
|
Force-Push: yes
Change-Id: Ifda1a168808d541f8899a06d39bb9d13733dbadc
|
|
also all the existing stuff has word headers now. it doesn't need them to run, it just has them anyway.
and EXIT was moved after DOCOL because it feels poetic that DOCOL is the first Forth word in the file
Force-Push: yes
Change-Id: I592445310712bfde42fde8cffd7bc672f16c4e6c
|
|
this is the final word called by interpreted words, to return
Force-Push: yes
Change-Id: I8301fa31009915e4beb069664c9bd16cdf33d879
|
|
it turns out things are real enough now that we can't just scribble
wherever :)
Change-Id: I26c71beaaefecae018ebb3ced4f1f579879a030a
Force-Push: yes
|
|
this is the core Forth thing, or a large part of it
Force-Push: yes
Change-Id: Id15cf5289cb7b41e0ea824ef68791f663c2f90e6
|
|
not quite, but very very near
Force-Push: yes
Change-Id: I79ae9f2970e4d7263db5c511e3a5398c22c4771c
|