| 233 | } |
| 234 | |
| 235 | fn abi_arg_slot(arg: &ABIOperand, next_stack: &mut u32, arg_base_offset: u32) -> LocalSlot { |
| 236 | match arg { |
| 237 | // Create a local slot, for input register spilling, |
| 238 | // with type-size aligned access. |
| 239 | ABIOperand::Reg { ty, size, .. } => { |
| 240 | *next_stack = align_to(*next_stack, *size) + *size; |
| 241 | LocalSlot::new(*ty, *next_stack) |
| 242 | } |
| 243 | // Create a local slot, with an offset from the arguments base in |
| 244 | // the stack; which is the frame pointer + return address. |
| 245 | ABIOperand::Stack { ty, offset, .. } => { |
| 246 | LocalSlot::stack_arg(*ty, offset + arg_base_offset) |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | impl Frame<Emission> { |