Skip to content

Commit bbfb4ed

Browse files
committed
fix incorrect stack allocation for u16
1 parent d333218 commit bbfb4ed

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

source/backends/x86_64.d

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -801,14 +801,8 @@ class BackendX86_64 : CompilerBackend {
801801

802802
variables ~= var;
803803

804-
if (var.Size() == 2) {
805-
output ~= "push word 0\n";
806-
}
807-
else if (var.Size() == 4) {
808-
output ~= "push dword 0\n";
809-
}
810-
else if (var.Size() == 8) {
811-
output ~= "push qword 0\n";
804+
if (var.Size() == 8) {
805+
output ~= "push 0\n";
812806
}
813807
else {
814808
output ~= format("sub rsp, %d\n", var.Size());

0 commit comments

Comments
 (0)