Full_add_flat.r8asm and full_add_flat_spaced.r8asm had their comments turned into question marks: they were written through a PowerShell Set-Content with ASCII encoding, which cannot represent Chinese and substitutes '?'. Rewritten as UTF-8, with the comments saying what the files are for. Both still assemble from cache (95 characters) and still produce the same tape, which is the point of the layout free metric. A scan of the whole tree for '???' now comes back empty.
21 lines
389 B
Plaintext
21 lines
389 B
Plaintext
%include "asm/lib.r8asm"
|
|
|
|
; 步长无关:metric flat 不计 .tp 的行走代价,结果与 cell 布局无关,
|
|
; 所以一份缓存能用在任何调用点(代价是纸带比按实际布局最优的长一点)。
|
|
%synth fulladd_flat
|
|
params 6
|
|
map 0 1 1 2 1 2 2 3
|
|
metric flat
|
|
%endsynth
|
|
|
|
.var A 0
|
|
.var B 1
|
|
.var Ci 2
|
|
.var S 3
|
|
.var Co 4
|
|
.var T 5
|
|
|
|
fulladd_flat A B Ci S Co T
|
|
output S
|
|
output Co
|