1
0
mirror of https://github.com/raspberrypi/pico-sdk.git synced 2025-08-09 04:22:44 +03:00

some minor pioasm fixes for #1950 (#2056)

This commit is contained in:
Graham Sanderson
2024-11-21 11:56:22 -06:00
committed by GitHub
parent 8970241772
commit 6bb3ccf822
3 changed files with 5 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ struct c_sdk_output : public output_format {
fprintf(out, " .instructions = %sprogram_instructions,\n", prefix.c_str()); fprintf(out, " .instructions = %sprogram_instructions,\n", prefix.c_str());
fprintf(out, " .length = %d,\n", (int) program.instructions.size()); fprintf(out, " .length = %d,\n", (int) program.instructions.size());
fprintf(out, " .origin = %d,\n", program.origin.get()); fprintf(out, " .origin = %d,\n", program.origin.get());
fprintf(out, " .pio_version = %d,\n", program.pio_version); fprintf(out, " .pio_version = %spio_version,\n", prefix.c_str());
fprintf(out, "#if PICO_PIO_VERSION > 0\n"); fprintf(out, "#if PICO_PIO_VERSION > 0\n");
fprintf(out, " .used_gpio_ranges = 0x%x\n", program.used_gpio_ranges); fprintf(out, " .used_gpio_ranges = 0x%x\n", program.used_gpio_ranges);
fprintf(out, "#endif\n"); fprintf(out, "#endif\n");

View File

@@ -1127,7 +1127,7 @@ namespace yy {
break; break;
case 22: // directive: ".in" value direction autop threshold case 22: // directive: ".in" value direction autop threshold
{ pioasm.get_current_program(yystack_[4].location, ".out", true).set_in(yylhs.location, yystack_[3].value.as < std::shared_ptr<resolvable> > (), yystack_[2].value.as < bool > (), yystack_[1].value.as < bool > (), yystack_[0].value.as < std::shared_ptr<resolvable> > ()); } { pioasm.get_current_program(yystack_[4].location, ".in", true).set_in(yylhs.location, yystack_[3].value.as < std::shared_ptr<resolvable> > (), yystack_[2].value.as < bool > (), yystack_[1].value.as < bool > (), yystack_[0].value.as < std::shared_ptr<resolvable> > ()); }
break; break;
case 23: // directive: ".out" value direction autop threshold case 23: // directive: ".out" value direction autop threshold
@@ -1135,7 +1135,7 @@ namespace yy {
break; break;
case 24: // directive: ".set" value case 24: // directive: ".set" value
{ pioasm.check_version(1, yylhs.location, ".in"); pioasm.get_current_program(yystack_[1].location, ".out", true).set_set_count(yylhs.location, yystack_[0].value.as < std::shared_ptr<resolvable> > ()); } { pioasm.get_current_program(yystack_[1].location, ".set", true).set_set_count(yylhs.location, yystack_[0].value.as < std::shared_ptr<resolvable> > ()); }
break; break;
case 25: // directive: ".wrap_target" case 25: // directive: ".wrap_target"

View File

@@ -199,9 +199,9 @@ directive:
| SIDE_SET value OPTIONAL { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, true, false); } | SIDE_SET value OPTIONAL { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, true, false); }
| SIDE_SET value PINDIRS { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, true); } | SIDE_SET value PINDIRS { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, true); }
| SIDE_SET value { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, false); } | SIDE_SET value { pioasm.get_current_program(@1, ".side_set", true).set_sideset(@$, $2, false, false); }
| DOT_IN value direction autop threshold { pioasm.get_current_program(@1, ".out", true).set_in(@$, $2, $3, $4, $5); } | DOT_IN value direction autop threshold { pioasm.get_current_program(@1, ".in", true).set_in(@$, $2, $3, $4, $5); }
| DOT_OUT value direction autop threshold { pioasm.get_current_program(@1, ".out", true).set_out(@$, $2, $3, $4, $5); } | DOT_OUT value direction autop threshold { pioasm.get_current_program(@1, ".out", true).set_out(@$, $2, $3, $4, $5); }
| DOT_SET value { pioasm.check_version(1, @$, ".in"); pioasm.get_current_program(@1, ".out", true).set_set_count(@$, $2); } | DOT_SET value { pioasm.get_current_program(@1, ".set", true).set_set_count(@$, $2); }
| WRAP_TARGET { pioasm.get_current_program(@1, ".wrap_target").set_wrap_target(@$); } | WRAP_TARGET { pioasm.get_current_program(@1, ".wrap_target").set_wrap_target(@$); }
| WRAP { pioasm.get_current_program(@1, ".wrap").set_wrap(@$); } | WRAP { pioasm.get_current_program(@1, ".wrap").set_wrap(@$); }
| WORD value { pioasm.get_current_program(@1, "instruction").add_instruction(std::shared_ptr<instruction>(new instr_word(@$, $2))); } | WORD value { pioasm.get_current_program(@1, "instruction").add_instruction(std::shared_ptr<instruction>(new instr_word(@$, $2))); }