Michael McLoughlin
775226218c
internal/gen: docstrings for instruction builders
...
Piggybacks off the docstrings for constructors in x64 package.
Closes #36
2019-01-06 21:12:15 -08:00
Michael McLoughlin
400288e4b6
build: use const for attribute values
2019-01-06 21:03:59 -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
0f63e0906d
ast: move "ast" types from root to ir sub-package
...
Closes #32
2019-01-06 14:21:10 -08:00
Michael McLoughlin
4a920c22b5
build: add missing doc comment ( #34 )
2019-01-06 13:53:57 -08:00
Michael McLoughlin
7d20ff4ced
build: test LogError
...
Closes #34
2019-01-06 13:52:37 -08:00
Michael McLoughlin
07901bb91b
build: return ErrorList type
...
Adds a very similar interface to go/scanner package for returning a list
of errors.
Updates #34
2019-01-06 13:32:09 -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
5c67547d67
doc: add package-level doc comments ( #9 )
2019-01-05 17:23:56 -08:00
Michael McLoughlin
7eb55c9ac5
build: doc external symbols ( #9 )
2019-01-05 16:49:59 -08:00
Michael McLoughlin
c95744c872
build: some more doc comments ( #9 )
2019-01-05 00:11:13 -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
05cfa809f2
build: include position information in errors
...
Updates #5
2019-01-04 15:01:29 -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
cf76c56dfc
testing: script to measure coverage of a binary
...
Updates #27
2019-01-02 20:04:45 -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
e364d6398e
ast,build: add Attributes fields to Function and Global
...
Updates #2
2018-12-30 23:35:54 -08:00
Michael McLoughlin
18cdf50d7c
reg: support for register casting
...
Adds methods for referencing sub- or super-registers. For example, for
general purpose registers you can now reference As8(), As16(), ... and
for vector AsX(), AsY(), AsZ().
Closes #1
2018-12-30 18:40:45 -08:00
Michael McLoughlin
9f5277bf8e
support docstrings
2018-12-27 23:01:32 -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
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
6d1424dc66
build: -cpuprofile flag
2018-12-21 17:38:19 -08:00
Michael McLoughlin
f464082484
examples/sha1: single block
2018-12-21 00:30:59 -08:00
Michael McLoughlin
ca5c7e7454
printer: add generated code warnings
2018-12-18 22:57:26 -08:00
Michael McLoughlin
7f3efa1eb5
fix nil pointer dereference
2018-12-17 21:20:21 -08:00
Michael McLoughlin
34a3ddefcc
start example/test for components access
2018-12-17 20:52:26 -08:00
Michael McLoughlin
c882e52510
printing: commit some refactors (probably broken)
2018-12-11 00:18:22 -08:00
Michael McLoughlin
271670c14c
avogen: make mov generator deterministic
2018-12-08 22:14:30 -08:00
Michael McLoughlin
20525e1437
get the basic add example working
2018-12-08 22:02:02 -08:00
Michael McLoughlin
5431f2edef
support signatures and param load/stores
2018-12-08 21:16:03 -08:00
Michael McLoughlin
69ee0e39cb
parameter loading
2018-12-08 20:14:51 -08:00
Michael McLoughlin
faafa00e40
pass: test for liveness
2018-12-03 20:40:43 -08:00
Michael McLoughlin
b52c67f3fb
pass: naive implementation of liveness
2018-12-02 23:59:29 -08:00
Michael McLoughlin
43575d8b61
start at some basic passes
2018-12-02 13:51:03 -08:00
Michael McLoughlin
0ba8a60ea5
add label type
2018-11-30 21:37:17 -08:00
Michael McLoughlin
241b5ea673
some command line flags for builders
2018-11-30 20:58:51 -08:00
Michael McLoughlin
9b9f5b7e0c
first pass at a "builder" interface
2018-11-30 20:43:31 -08:00