Skip to content

Commit

Permalink
stage1: update inline asm outputs to LLVM 14
Browse files Browse the repository at this point in the history
LLVM pointers are transitioning to no longer have types, however, inline
assembly inputs and outputs which accept pointers need to know the
element type. So, inline assembly must be upgraded to add
elementtype(<ty>) annotations.
  • Loading branch information
andrewrk committed Jul 2, 2022
1 parent 1fa4a58 commit d19290e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stage1/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5575,6 +5575,7 @@ static LLVMValueRef ir_render_asm_gen(CodeGen *g, Stage1Air *executable, Stage1A
buf_appendf(&constraint_buf, "=%s", buf_ptr(asm_output->constraint) + 1);
} else {
buf_appendf(&constraint_buf, "=*%s", buf_ptr(asm_output->constraint) + 1);
param_needs_attr[param_index] = true;
}
if (total_index + 1 < total_constraint_count) {
buf_append_char(&constraint_buf, ',');
Expand Down

0 comments on commit d19290e

Please sign in to comment.