diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-12 02:07:26 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-12 02:07:26 +0200 |
commit | 5d15afc926aeb38eb36676bb72d11022b2cda412 (patch) | |
tree | 9d291fa29003115c9878e849c9cb972a715ad41c /common.sml | |
parent | aad6f4f80e3196b052e96176ff412ddb7ceb7ef6 (diff) |
rbp register utilization by register allocator
Diffstat (limited to 'common.sml')
-rw-r--r-- | common.sml | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -194,7 +194,17 @@ fun bindWith2str to = bind A1 (fn v => fn (output, _) => output $ to v) fun F z = bind A0 (fn (_, mf) => mf ()) z -val I = fn z => bindWith2str Int.toString z +val I = fn z => +let + fun f v out = + if v >= 0 then + Printf out `(Int.toString v) % + else + Printf out `"-" `(Int.toString $ ~v) % +in + bind A1 f +end z + fun i v out = Printf out I v % val Ip = fn z => |