Michael McLoughlin
8f3c4ea0bf
examples: cpu feature checks ( #171 )
...
Add necessary feature checks to the dot and geohash examples to prevent illegal instruction errors.
Fixes #170 #153
2021-04-06 22:24:58 -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
d43efabdbe
inst,ir: cancelling inputs ( #92 )
...
Adds support for a `CancellingInputs` instruction flag, to indicate cases like `XORQ R10, R10` where the instruction actually does not depend on the value of `R10` at all.
Closes #89
2019-07-28 17:58:49 -07:00
Michael McLoughlin
5d3176b111
examples/stadtx: re-fork stadx code
...
The gofumpt changes made some files *technically* not an exact fork of
the original. I'm OCD about these things.
2019-04-13 22:55:27 -05:00
Michael McLoughlin
1735441939
all: apply gofumpt ( #79 )
...
Apply @mvdan's opinionated gofumpt formatter across the codebase.
2019-04-13 22:53:13 -05:00
Michael McLoughlin
87539d3a7f
examples: remove errant backup tarball
2019-03-17 14:55:44 -07:00
Michael McLoughlin
9eb409b935
gotypes,build: pointer dereference ( #61 )
...
Provides a method on `gotypes.Component` to allow pointer dereference. This will enable `gotypes` helpers to be used with struct pointer arguments, for example.
Updates #53
Fixes #54
2019-01-27 19:22:21 -08:00
Michael McLoughlin
eb225e9d2c
gotypes,build: add Implement ( #58 )
...
By using Implement you can provide a definition of a function, taking the signature from a stub in the package. One major benefit of this approach is it makes it easy to handle external types in the function signature.
Updates #55
2019-01-22 22:35:01 -08: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
cdf63e263d
lint: spelling mistake
2019-01-13 11:09:54 -08:00
Michael McLoughlin
4aa8656eb0
lint: fix issues in examples ( #49 )
2019-01-13 10:12:52 -08:00
Michael McLoughlin
943d5f0ced
examples/sum: attempt to avoid asmfmt mismatch
...
Updates #41
Updates #8
2019-01-11 11:06:10 -08:00
Michael McLoughlin
3ca82be16c
examples/sum: use Comment ( #41 )
2019-01-11 10:57:38 -08:00
Michael McLoughlin
85432688f1
examples/sha1: forgot to regenerate README
2019-01-11 10:54:27 -08:00
Michael McLoughlin
d0357fa6f9
examples/sha1: use comments ( #41 )
2019-01-11 10:52:09 -08:00
Michael McLoughlin
f77a2e3b9e
printer: use tabwriter to align instructions ( #8 )
2019-01-10 21:21:41 -08:00
Michael McLoughlin
0e253b3753
examples/stadtx: delete PeachPy comments
...
Fixes #16
2019-01-09 22:53:41 -08:00
Michael McLoughlin
ea3d101f08
examples/sha1: use loops where possible
2019-01-06 20:26:04 -08:00
Michael McLoughlin
4f73a6ea72
doc: forgot to regenerate on last commit
2019-01-06 20:16:26 -08:00
Michael McLoughlin
304c7425d2
build: add attributes argument to TEXT
...
Brings the TEXT() function signature closer to how the directive works
in assembly.
Also update almost all examples to use NOSPLIT.
Closes #11
2019-01-06 20:04:51 -08:00
Michael McLoughlin
ff7d8afefe
doc,examples/sum: improve doc on sum example
...
Updates #13
2019-01-06 18:09:37 -08:00
Michael McLoughlin
49b1691ac0
doc: description of examples/ and tests/
2019-01-06 14:25:05 -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
87ffa6823a
examples: forgot to regenerate
...
Sync READMEs with example code.
Updates #31
2019-01-05 17:44:10 -08:00
Michael McLoughlin
1cdd4b912b
examples: remove non-dot imports
...
Updates #31
2019-01-05 17:41:07 -08:00
Michael McLoughlin
5c67547d67
doc: add package-level doc comments ( #9 )
2019-01-05 17:23:56 -08:00
Michael McLoughlin
672b77a441
reg,build: remove "v" from virtual register ctors
...
Fixes #30
2019-01-04 18:23:44 -08:00
Michael McLoughlin
fa7b5ed1dd
doc: show more examples in README
2019-01-03 22:20:25 -08:00
Michael McLoughlin
0eb66fe6cc
doc: READMEs for remaining "real world" examples
...
Updates #14
2019-01-01 17:01:08 -08:00
Michael McLoughlin
85a72997aa
doc: README for data example
...
Updates #14
2019-01-01 16:33:30 -08:00
Michael McLoughlin
49c795704d
doc: README for returns example
...
Updates #14
2019-01-01 16:15:33 -08:00
Michael McLoughlin
51931ee673
doc: README for sum example
...
Updates #14
2019-01-01 16:04:37 -08:00
Michael McLoughlin
8465c21c02
doc: README for complex example
...
Updates #14
2019-01-01 15:56:17 -08:00
Michael McLoughlin
1b0ce66552
doc: README for args example
...
Also started a README in the root examples directory.
Updates #14
2019-01-01 15:46:42 -08:00
Michael McLoughlin
4550badf58
doc: scripts to run embedmd on markdown files
...
This will help keep READMEs in sync with code.
Also adds a README for the add example.
Updates #14
2018-12-31 20:25:29 -08:00
Michael McLoughlin
816fa4c0e6
ast,build: allow setting data attributes
...
Previously GLOBL/DATA attributes are set to RODATA. This diff removes
that default and allows them to be set through the DataAttributes
context method.
Updates #2
2018-12-31 19:04:14 -08:00
Michael McLoughlin
c62e40f8d2
pass: add textflags.h if required
...
Closes #12
2018-12-31 00:23:27 -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
edc4d3f00c
examples/dot: initial version
...
Implements dot product in avo.
Closes #4
2018-12-30 18:46:36 -08:00
Michael McLoughlin
2ffc7d7fd5
examples: add most docstrings
2018-12-27 23:09:44 -08:00
Michael McLoughlin
9f5277bf8e
support docstrings
2018-12-27 23:01:32 -08:00
Michael McLoughlin
023324a4ec
examples/returns: demonstrate return types
2018-12-27 21:38:17 -08:00
Michael McLoughlin
51524702ba
mv examples/{components,args}
2018-12-27 20:37:47 -08:00
Michael McLoughlin
6fc67c1fbc
examples/geohash: first version
...
Adds helper for constants as DATA sections.
2018-12-27 15:44:52 -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
662ae52758
examples: adapt to new const types
2018-12-26 17:08:58 -08:00
Michael McLoughlin
1ce7acee1d
examples/sha1: implement full hash and test
2018-12-21 16:15:43 -08:00