diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-22 21:06:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-22 21:09:28 -0700 |
commit | 827dd4a7fe98e80e776b206bb4966e22e22ce3c9 (patch) | |
tree | 699e33beb349cee09fc82d81dfd9c7ebef25e90a /linux/labels_baremetal.subx | |
parent | b41aed4a9adda23ca2613a24fefa3eafbd611987 (diff) | |
download | mu-827dd4a7fe98e80e776b206bb4966e22e22ce3c9.tar.gz |
start throwing error on duplicate label
One less error that's only in the bootstrap phase. On the other hand, for simplicity I got rid of the ability to override the Entry label. One less special case, but we're also going further from the ability to run subsets of layers. We haven't really been exercising it for a long time, though (commit 7842, March 2021 when we made baremetal the default).
Diffstat (limited to 'linux/labels_baremetal.subx')
-rw-r--r-- | linux/labels_baremetal.subx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/labels_baremetal.subx b/linux/labels_baremetal.subx index e1743c0b..6e1d559b 100644 --- a/linux/labels_baremetal.subx +++ b/linux/labels_baremetal.subx @@ -216,7 +216,7 @@ load-labels: # in: (addr buffered-file), labels: (stream {label-name, address} # read-line-buffered(in, line) # if (line->write == 0) break # end of file # var word-slice/ecx: (addr slice) = next-word(line) - # var dest/edi: (addr int) = get-or-insert-slice(labels, word-slice, 12 bytes/row) + # var dest/edi: (addr int) = insert-slice-or-abort(labels, word-slice, 12 bytes/row) # word-slice = next-word(line) # var address/eax: int = parse-hex-int-from-slice(word-slice) # *dest = address @@ -333,15 +333,15 @@ $load-labels:loop: #? # . . discard args #? 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp #? # }}} - # var dest/edi: (addr int) = get-or-insert-slice(labels, word-slice, 12 bytes/row, Heap) - # . eax = get-or-insert-slice(labels, word-slice, 12 bytes/row, Heap) + # var dest/edi: (addr int) = insert-slice-or-abort(labels, word-slice, 12 bytes/row, Heap) + # . eax = insert-slice-or-abort(labels, word-slice, 12 bytes/row, Heap) # . . push args 68/push Heap/imm32 68/push 0xc/imm32/row-size 52/push-edx ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 . # push *(ebp+12) # . . call - e8/call get-or-insert-slice/disp32 + e8/call insert-slice-or-abort/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32 # add to esp # . edi = eax |