Commit Graph

22 Commits

Author SHA1 Message Date
Kartik Agaram dd9ba09a7c 4888
We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
2018-12-29 13:36:06 -08:00
Kartik Agaram 431627b242 4886 2018-12-28 21:26:42 -08:00
Kartik Agaram 044b413021 4879 2018-12-28 02:07:11 -08:00
Kartik Agaram 81605224f0 4847 2018-12-06 09:41:40 -08:00
Kartik Agaram a94b60b5cc 4840
New helper: printing a string to a buffered file.
2018-12-04 12:16:17 -08:00
Kartik Agaram 9e03e2bd37 4837
Let's standardize to use opcode 39 rather than 3b by default.
2018-12-04 10:19:18 -08:00
Kartik Agaram cf02c20bb0 4832
Let's start adding ':end' labels in all functions, just because it helps
us visualize where function calls end in traces, thanks to the '--map'
commandline argument.
2018-12-04 00:29:06 -08:00
Kartik Agaram 5082923e81 4826 2018-12-03 16:34:16 -08:00
Kartik Agaram 0eb0f69616 4821 2018-12-02 22:41:28 -08:00
Kartik Agaram 0043952064 4819 2018-12-02 16:58:30 -08:00
Kartik Agaram c98d4b1c6a 4818 2018-12-02 14:41:21 -08:00
Kartik Agaram f44c595267 4815 2018-12-02 11:08:30 -08:00
Kartik Agaram 54e5128a14 4813 2018-12-01 12:44:10 -08:00
Kartik Agaram c7d45d918b 4812 2018-11-30 22:57:52 -08:00
Kartik Agaram 9d27e966b5 4808 - clean up comments in all subx files 2018-11-30 16:45:15 -08:00
Kartik Agaram ee9a9237d6 4802
Some automated commenting cleanup. Still needs more careful manual scanning.

  sed -i 's/^#   1-3/# . 1-3/' *.subx */*.subx
  sed -i 's/^#   op/# . op/' *.subx */*.subx
  sed -i 's/# vim/# . . vim/' *.subx */*.subx
  sed -i 's/^    # push args/    # . . push args/' *.subx */*.subx
  sed -i 's/^    # discard args/    # . . discard args/' *.subx */*.subx
  sed -i 's/^    # call/    # . . call/' *.subx */*.subx
  sed -i 's/^    # prolog/    # . prolog/' *.subx */*.subx
  sed -i 's/^    # epilog/    # . epilog/' *.subx */*.subx
  sed -i 's/^    # save registers/    # . save registers/' *.subx */*.subx
  sed -i 's/^    # restore registers/    # . restore registers/' *.subx */*.subx
  sed -i 's/  operand  /  register /' *.subx */*.subx
2018-11-30 11:13:36 -08:00
Kartik Agaram 6030d7e2e5 4801
Reindent all SubX code to make some room for the new comment style.
2018-11-30 10:54:42 -08:00
Kartik Agaram e9661581f0 4800 2018-11-30 10:37:14 -08:00
Kartik Agaram 2b7ba2a56a 4799 2018-11-30 10:35:03 -08:00
Kartik Agaram a20b51bdb7 4797 2018-11-30 09:45:07 -08:00
Kartik Agaram 50dcc0c122 4776
Crenshaw compiler now runs natively as well.

It turns out I was misreading the Intel manual, and the jump instructions
that I thought take disp16 operands actually take disp32 operands by default
on both i686 and x86_64 processors. The disp16 versions are some holdover
from the 16-bit days.

This was the first time I've used one of these erstwhile-disp16 instructions,
but I still haven't tested most of them. We'll see if we run into future
issues.
2018-11-25 13:46:53 -08:00
Kartik Agaram 33fdc60b16 4775
Start with an exactly corresponding version to Crenshaw 2-1: single-digit
numbers. The only change: we assume the number is in hex.

The next version now supports multi-digit hex numbers.
2018-11-24 23:26:14 -08:00