add docs for assembly and fix global assembly parsing
Previously, global assembly was parsed expecting it to have the template syntax. However global assembly has no inputs, outputs, or clobbers, and thus does not have template syntax. This is now fixed. This commit also adds a compile error for using volatile on global assembly, since it is meaningless. closes #1515
This commit is contained in:
@@ -862,8 +862,8 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
|
||||
case NodeTypeAsmExpr:
|
||||
{
|
||||
AstNodeAsmExpr *asm_expr = &node->data.asm_expr;
|
||||
const char *volatile_str = asm_expr->is_volatile ? " volatile" : "";
|
||||
fprintf(ar->f, "asm%s (\"%s\"\n", volatile_str, buf_ptr(asm_expr->asm_template));
|
||||
const char *volatile_str = (asm_expr->volatile_token != nullptr) ? " volatile" : "";
|
||||
fprintf(ar->f, "asm%s (\"%s\"\n", volatile_str, buf_ptr(&asm_expr->asm_template->data.str_lit.str));
|
||||
print_indent(ar);
|
||||
fprintf(ar->f, ": ");
|
||||
for (size_t i = 0; i < asm_expr->output_list.length; i += 1) {
|
||||
|
||||
Reference in New Issue
Block a user