Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworked the SBF textual assembly syntax to match the rbpf-style syntax. #54

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

nvjle
Copy link

@nvjle nvjle commented Nov 15, 2022

  • Update the syntax of every instruction in SBFInstrInfo.td (currently using the asm variants feature to temporarily support both).
  • Update AsmParser for the new syntax (add new operand, memory, instruction, and directive parse routines).
  • Add error checking for unresolved 16-bit branch relocations and emit error message for graceful exit (the old BPF back-end crashes) and corresponding lit unit test.
  • Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover disassembly, object emission, and parsing of every single instruction. This is more extensive coverage than existed previously.
  • Remaster all CodeGen/SBF unit tests accordingly.
  • A minor TableGen patch was needed to support asm strings containing '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we currently support both syntaxes to ease the verification (e.g., being able to see and compare each instruction and object code side-by-side within each unit test). After some 'soak time' for the new functionality, I intend to remove the old syntax altogether and otherwise clean-up. We'll also remove the TableGen patch at that time.

- Update the syntax of every instruction in SBFInstrInfo.td (currently
  using the asm variants feature to temporarily support both).
- Update AsmParser for the new syntax (add new operand, memory,
  instruction, and directive parse routines).
- Add error checking for unresolved 16-bit branch relocations and
  emit error message for graceful exit (the old BPF back-end crashes)
  and corresponding lit unit test.
- Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
  disassembly, object emission, and parsing of every single instruction.
  This is more extensive coverage than existed previously.
- Remaster all CodeGen/SBF unit tests accordingly.
- A minor TableGen patch was needed to support asm strings containing
  '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we
currently support both syntaxes to ease the verification (e.g., being
able to see and compare each instruction and object code side-by-side
within each unit test). After some 'soak time' for the new functionality,
I intend to remove the old syntax altogether and otherwise clean-up. We'll
also remove the TableGen patch at that time.
@nvjle nvjle requested a review from dmakarov November 15, 2022 04:50
@nvjle nvjle self-assigned this Nov 15, 2022
@nvjle nvjle merged commit 4d40f82 into solana-rustc/14.0-2022-03-22 Nov 15, 2022
nvjle added a commit that referenced this pull request Dec 12, 2023
Patch #54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
nvjle added a commit that referenced this pull request Dec 12, 2023
Patch #54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
LucasSte pushed a commit to LucasSte/llvm-project that referenced this pull request Jan 31, 2024
…e syntax. (anza-xyz#54)

- Update the syntax of every instruction in SBFInstrInfo.td (currently
  using the asm variants feature to temporarily support both).
- Update AsmParser for the new syntax (add new operand, memory,
  instruction, and directive parse routines).
- Add error checking for unresolved 16-bit branch relocations and
  emit error message for graceful exit (the old BPF back-end crashes)
  and corresponding lit unit test.
- Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
  disassembly, object emission, and parsing of every single instruction.
  This is more extensive coverage than existed previously.
- Remaster all CodeGen/SBF unit tests accordingly.
- A minor TableGen patch was needed to support asm strings containing
  '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we
currently support both syntaxes to ease the verification (e.g., being
able to see and compare each instruction and object code side-by-side
within each unit test). After some 'soak time' for the new functionality,
I intend to remove the old syntax altogether and otherwise clean-up. We'll
also remove the TableGen patch at that time.
LucasSte pushed a commit to LucasSte/llvm-project that referenced this pull request Jan 31, 2024
Patch anza-xyz#54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
@dmakarov dmakarov deleted the jle-new-asm-syntax branch February 14, 2024 21:59
LucasSte pushed a commit that referenced this pull request Feb 16, 2024
…e syntax. (#54)

- Update the syntax of every instruction in SBFInstrInfo.td (currently
  using the asm variants feature to temporarily support both).
- Update AsmParser for the new syntax (add new operand, memory,
  instruction, and directive parse routines).
- Add error checking for unresolved 16-bit branch relocations and
  emit error message for graceful exit (the old BPF back-end crashes)
  and corresponding lit unit test.
- Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
  disassembly, object emission, and parsing of every single instruction.
  This is more extensive coverage than existed previously.
- Remaster all CodeGen/SBF unit tests accordingly.
- A minor TableGen patch was needed to support asm strings containing
  '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we
currently support both syntaxes to ease the verification (e.g., being
able to see and compare each instruction and object code side-by-side
within each unit test). After some 'soak time' for the new functionality,
I intend to remove the old syntax altogether and otherwise clean-up. We'll
also remove the TableGen patch at that time.
LucasSte pushed a commit that referenced this pull request Feb 16, 2024
Patch #54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
LucasSte pushed a commit to LucasSte/llvm-project that referenced this pull request Jun 28, 2024
…e syntax. (anza-xyz#54)

- Update the syntax of every instruction in SBFInstrInfo.td (currently
  using the asm variants feature to temporarily support both).
- Update AsmParser for the new syntax (add new operand, memory,
  instruction, and directive parse routines).
- Add error checking for unresolved 16-bit branch relocations and
  emit error message for graceful exit (the old BPF back-end crashes)
  and corresponding lit unit test.
- Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
  disassembly, object emission, and parsing of every single instruction.
  This is more extensive coverage than existed previously.
- Remaster all CodeGen/SBF unit tests accordingly.
- A minor TableGen patch was needed to support asm strings containing
  '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we
currently support both syntaxes to ease the verification (e.g., being
able to see and compare each instruction and object code side-by-side
within each unit test). After some 'soak time' for the new functionality,
I intend to remove the old syntax altogether and otherwise clean-up. We'll
also remove the TableGen patch at that time.
LucasSte pushed a commit to LucasSte/llvm-project that referenced this pull request Jun 28, 2024
Patch anza-xyz#54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
LucasSte pushed a commit that referenced this pull request Aug 19, 2024
…e syntax. (#54)

- Update the syntax of every instruction in SBFInstrInfo.td (currently
  using the asm variants feature to temporarily support both).
- Update AsmParser for the new syntax (add new operand, memory,
  instruction, and directive parse routines).
- Add error checking for unresolved 16-bit branch relocations and
  emit error message for graceful exit (the old BPF back-end crashes)
  and corresponding lit unit test.
- Add new lit unit tests in MC/SBF and MC/Disassembler/SBF to cover
  disassembly, object emission, and parsing of every single instruction.
  This is more extensive coverage than existed previously.
- Remaster all CodeGen/SBF unit tests accordingly.
- A minor TableGen patch was needed to support asm strings containing
  '|' within variant strings ('|' happens to be the variant separator).

The patch is a bit more complex than it otherwise might be in that we
currently support both syntaxes to ease the verification (e.g., being
able to see and compare each instruction and object code side-by-side
within each unit test). After some 'soak time' for the new functionality,
I intend to remove the old syntax altogether and otherwise clean-up. We'll
also remove the TableGen patch at that time.
LucasSte pushed a commit that referenced this pull request Aug 19, 2024
Patch #54 originally
reworked the SBF textual assembly syntax to match the rbpf-style syntax.

In order to allow some soak-time, the above patch temporarily supported
both the old and new syntax (selectable on the command line or via bespoke
assembler directives). A little over a year has passed since then,
and all is well with the new syntax, testing, and so forth.

The current patch now removes all existing remnants of the old syntax--
including some of the target-independent changes made in the original
patch to support both (e.g., a minor TableGen change for variants, some
additional command line selector flags, etc).

All related unit tests have been updated accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants