diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-04-17 20:03:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-04-17 20:03:16 -0700 |
commit | ee0993a71dbf89dbd7322863b8e4750b1b701392 (patch) | |
tree | 44d3dcc78ca85f51b537a72f3a513853a6f31cd5 /vm.c | |
parent | 392f2f4b28c44d208b551e1354a02fe392968c0d (diff) | |
download | txr-ee0993a71dbf89dbd7322863b8e4750b1b701392.tar.gz txr-ee0993a71dbf89dbd7322863b8e4750b1b701392.tar.bz2 txr-ee0993a71dbf89dbd7322863b8e4750b1b701392.zip |
vm/asm: reconfiguration of display dimensions.
Increasing the maximum frame width from 256 to 1024 words;
and reducing the max display depth from 256 to 64 frames.
Small operands use a 4:6 split: the first 64 words
of the first 16 levels can be accessed with a 10
bit operand.
* share/txr/stdlib/asm.tl (parse-operand): Adjust to
wider syntax for registers due to more digits.
The v registers are 5 hex digits now: 2 digit level,
and a 3 digit offset.
(with-lev-idx): New macro.
(operand-to-sym): Use with-lev-idx and rename variables
to lv and ix.
(small-op-p, enc-op-p, small-op-to-sym): Rewrite for 4:6 small
operand.
* share/txr/stdlib/vm-param.tl (%lev-size%, %lev-bits%,
%max-lev%): Adjust values.
(%sm-lev-size%, %max-sm-lev-idx%, sm-lev-bits%): New symbol
macros.
* vm.c (VM_LEV_BITS, VM_LEV_MASK, VM_SM_LEV_BITS,
VM_SM_LEV_MASK): Values adjusted.
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -295,10 +295,10 @@ static void vm_reset(struct vm *vm, struct vm_desc *vd, #define vm_insn_bigop(insn) (((insn) & 0x3FFFFFFU)) #define vm_arg_operand_lo(arg) ((arg) & 0xFFFFU) #define vm_arg_operand_hi(arg) ((arg) >> 16) -#define VM_LEV_BITS 8 -#define VM_LEV_MASK 0xFF -#define VM_SM_LEV_BITS 8 -#define VM_SM_LEV_MASK 0xFF +#define VM_LEV_BITS 10 +#define VM_LEV_MASK 0x3FF +#define VM_SM_LEV_BITS 6 +#define VM_SM_LEV_MASK 0x3F #define vm_lev(arg) ((arg) >> VM_LEV_BITS) #define vm_idx(arg) ((arg) & VM_LEV_MASK) #define vm_sm_lev(arg) ((arg) >> VM_SM_LEV_BITS) |