1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: correctly format segment offsets (#12364)

This commit is contained in:
crthpl 2021-11-01 23:04:41 -07:00 committed by GitHub
parent 9aba00cd08
commit 1d1793ec34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,10 @@ fn (mut f Fmt) asm_arg(arg ast.AsmArg) {
f.write(arg)
}
ast.AsmAddressing {
if arg.segment != '' {
f.write(arg.segment)
f.write(':')
}
f.write('[')
base := arg.base
index := arg.index