Commit Graph

25 Commits

Author SHA1 Message Date
Michael McLoughlin
79bee1a316 printer: constraints formatting (#209)
Uses `buildtag.Format` to format constraints in the assembly and stub file
printers. This will ensure `// + build` and `//go:build` syntax are used
consistent with the current Go version.

Updates #183
2021-10-29 01:08:02 -07:00
Michael McLoughlin
e089a6c93c tests/fixedbugs: regression test for issue 100 (#129)
Adds a regression test based on klauspost/compress#186. This necessitated some related changes:

* Mark "RET" as a terminal instruction
* printer refactor to maintain compatibility with asmfmt
* Tweaks to other regression tests to ensure they are run correctly in CI

Updates #100 #65 #8
2020-01-27 21:05:33 -08:00
Michael McLoughlin
cde7e9483b pass,printer: display required ISA features (#120)
Fixes #119
2020-01-19 16:45:09 -08:00
Michael McLoughlin
c8004ba627 ir,build: pragma support (#97)
Adds support for arbitrary compiler directives.

Fixes #15
2019-09-16 11:01:48 -07:00
Michael McLoughlin
475a241446 operand: include '+0' in named symbol references
Intended to address an asmdecl error.

  [amd64] Butterfly: use of unnamed argument 0(FP); offset 0 is x0+0(FP)

Updates #24
2019-01-13 12:00:57 -08:00
Michael McLoughlin
284ee13ada build: support comments in functions (#41) 2019-01-11 10:33:41 -08:00
Michael McLoughlin
f77a2e3b9e printer: use tabwriter to align instructions (#8) 2019-01-10 21:21:41 -08:00
Michael McLoughlin
0f63e0906d ast: move "ast" types from root to ir sub-package
Closes #32
2019-01-06 14:21:10 -08:00
Michael McLoughlin
602bb5197c build: unify Label function signatures
The Context.Label method and LABEL global function did not agree. Also
breaks the convention I'd like to set that capitalized functions must
agree with existing Go assembly syntax.

To help avoid a conflict with `avo.Label`, attributes were moved to
their own package.

Fixes #35
2019-01-05 18:18:49 -08:00
Michael McLoughlin
9d4cd16f88 printer: stop printer_test.go looking like generated code 2019-01-04 19:10:55 -08:00
Michael McLoughlin
88eff53893 printer: doc for exported symbols
Updates #9
2019-01-04 19:03:05 -08:00
Michael McLoughlin
301d0c137a internal/stack: helper package for querying stack frames
Intended for #5. Also replaces a helper function in the `printer`
package.
2019-01-04 00:46:27 -08:00
Michael McLoughlin
36984c7031 printer: output build tags in stubs file
Updates #3
2019-01-02 22:01:38 -08:00
Michael McLoughlin
75224ed031 build: remove Build stutter from BuildConstraint*
Address golint failure.
2019-01-02 21:55:43 -08:00
Michael McLoughlin
6202c2c9aa ast,build: add build constraints to File
Updates #3
2019-01-02 21:35:17 -08:00
Michael McLoughlin
c62e40f8d2 pass: add textflags.h if required
Closes #12
2018-12-31 00:23:27 -08:00
Michael McLoughlin
4aaf6bc7ed ast,printer: add Includes field to File
Updates #12
2018-12-31 00:08:54 -08:00
Michael McLoughlin
e364d6398e ast,build: add Attributes fields to Function and Global
Updates #2
2018-12-30 23:35:54 -08:00
Michael McLoughlin
9f5277bf8e support docstrings 2018-12-27 23:01:32 -08:00
Michael McLoughlin
5dea46407c printer: shorten text size when argsize is zero 2018-12-27 13:48:31 -08:00
Michael McLoughlin
9243d299e6 first pass at DATA sections 2018-12-27 11:57:46 -08:00
Michael McLoughlin
d29c6340d7 ast: change file to have a list of sections 2018-12-26 18:58:12 -08:00
Michael McLoughlin
ca5c7e7454 printer: add generated code warnings 2018-12-18 22:57:26 -08:00
Michael McLoughlin
213d65e481 printer: cleaner output 2018-12-18 21:05:05 -08:00
Michael McLoughlin
c882e52510 printing: commit some refactors (probably broken) 2018-12-11 00:18:22 -08:00