| ... | ... | @@ -3252,9 +3252,11 @@ fn genSetStack(self: *Self, ty: Type, stack_offset: u32, mcv: MCValue) InnerErro |
| 3252 | 3252 | } |
| 3253 | 3253 | return self.fail("TODO implement memcpy for setting stack from {}", .{mcv}); |
| 3254 | 3254 | }, |
| 3255 | | .ptr_stack_offset, |
| 3256 | | .stack_offset, |
| 3257 | | => |off| { |
| 3255 | .ptr_stack_offset => { |
| 3256 | const reg = try self.copyToTmpRegister(ty, mcv); |
| 3257 | return self.genSetStack(ty, stack_offset, MCValue{ .register = reg }); |
| 3258 | }, |
| 3259 | .stack_offset => |off| { |
| 3258 | 3260 | if (stack_offset == off) { |
| 3259 | 3261 | // Copy stack variable to itself; nothing to do. |
| 3260 | 3262 | return; |