fmt: correctly format segment offsets (#12364)

pull/12366/head
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
1 changed files with 4 additions and 0 deletions

View File

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