Skip to content

Commit f3baaa0

Browse files
authored
slow_tests: fix asm_test.amd64.v (#24451)
1 parent 00ef1a6 commit f3baaa0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vlib/v/slow_tests/assembly/asm_test.amd64.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ fn test_inline_asm() {
100100

101101
assert util.add(8, 9, 34, 7) == 58 // test .amd64.v imported files
102102

103-
mut o := Manu{}
103+
mut o := &Manu{}
104104
asm amd64 {
105105
mov eax, 0
106106
cpuid
107107
; =b (o.ebx) as ebx0
108108
=d (o.edx) as edx0
109109
=c (o.ecx) as ecx0
110110
}
111-
o.str()
111+
assert o.str()[0].is_capital()
112112
}
113113

114114
@[packed]
@@ -120,11 +120,11 @@ mut:
120120
zero u8 // for string
121121
}
122122

123-
fn (m Manu) str() string {
123+
fn (m &Manu) str() string {
124124
return unsafe {
125125
string{
126-
str: &u8(&m)
127-
len: 24
126+
str: m
127+
len: 12
128128
is_lit: 1
129129
}
130130
}

0 commit comments

Comments
 (0)