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
f2315d539c
tests: autogenerated test to confirm attribute strings
...
Test helps verify our attribute types match the macros in textflag.h.
Discovered https://golang.org/issue/29487 in the process.
Updates #2
2018-12-31 17:30:06 -08:00
Michael McLoughlin
6d6ff3cfc1
legal: include LICENSEs for data files
...
We depend upon data files from golang arch sub-repo and the Opcodes XML
database (behind PeachPy). This change includes their LICENSE files.
Updates #22
2018-12-31 16:17:44 -08:00
Michael McLoughlin
9fbb71b6db
lint: enable golint
...
Enables golint and fixes function naming errors (operand checks
incorrectly cased).
Fixes #10
2018-12-31 11:20:59 -08:00
Michael McLoughlin
c79a926930
lint: enable some more linters
2018-12-31 11:01:50 -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
5d270d8d76
lint
2018-12-30 21:45:35 -08:00
Michael McLoughlin
9de1e3573c
ast: Attribute type
...
Updates #2
2018-12-30 19:57:06 -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
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
4644d996ee
reg: remove unused ID() method
2018-12-28 20:42:48 -08:00
Michael McLoughlin
a1440c51a4
pass: some basic allocator test cases
2018-12-28 15:48:37 -08:00
Michael McLoughlin
238771f86f
x86: remove unused error type
2018-12-28 15:47:38 -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
d29c6340d7
ast: change file to have a list of sections
2018-12-26 18:58:12 -08:00
Michael McLoughlin
bf6031521f
ci: run benchmarks if we have any
2018-12-26 17:11:54 -08:00
Michael McLoughlin
662ae52758
examples: adapt to new const types
2018-12-26 17:08:58 -08:00
Michael McLoughlin
abd300c0e9
operand: const types
2018-12-26 16:42:39 -08:00
Michael McLoughlin
b3644ec7fc
pass: tweak ordering in liveness analysis
...
Previously we updated the set of live in registers before live out. This
was extremely inefficient, since on each pass through live in depends on
live out.
We also change to processing the instructions in reverse order, which is
more likely to be efficient, although we should replace this with
topological sort order soon.
2018-12-24 12:48:29 -08:00
Michael McLoughlin
6d1424dc66
build: -cpuprofile flag
2018-12-21 17:38:19 -08:00
Michael McLoughlin
1ce7acee1d
examples/sha1: implement full hash and test
2018-12-21 16:15:43 -08:00
Michael McLoughlin
f464082484
examples/sha1: single block
2018-12-21 00:30:59 -08:00
Michael McLoughlin
224cccd2b1
readme giving credit to original authors
2018-12-19 22:46:53 -08:00
Michael McLoughlin
c477e46045
add forking script
2018-12-19 22:32:45 -08:00
Michael McLoughlin
854271d978
examples/stadtx: commit first working example
2018-12-19 22:09:55 -08:00
Michael McLoughlin
48a84b6b13
fix signature size/alignment computation
2018-12-19 13:08:56 -08:00
Michael McLoughlin
33f5561d91
examples/components: a few more cases
2018-12-19 00:16:18 -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
bc9a2aa46b
gotypes: support struct fields
2018-12-17 23:28:31 -08:00
Michael McLoughlin
7f3efa1eb5
fix nil pointer dereference
2018-12-17 21:20:21 -08:00
Michael McLoughlin
1033aa4f9c
add golang.org/x/tools dependency
2018-12-17 21:13:00 -08:00
Michael McLoughlin
34a3ddefcc
start example/test for components access
2018-12-17 20:52:26 -08:00
Michael McLoughlin
8282c9b17e
fix operand check tests
2018-12-14 22:12:28 -08:00
Michael McLoughlin
c70c642ddb
attempt to make register allocation deterministic
2018-12-13 00:34:44 -08:00
Michael McLoughlin
93b53377ac
add fnv1a example
2018-12-13 00:18:44 -08:00
Michael McLoughlin
b89d211ff4
examples/complex: and bugfixes
2018-12-12 00:02:22 -08:00
Michael McLoughlin
2189d38d1e
examples: add sum example (its not pretty)
2018-12-11 23:02:50 -08:00
Michael McLoughlin
19d1761694
fix couple of tests
2018-12-11 22:35:01 -08:00
Michael McLoughlin
79bdb92163
fix ordering of generate script
2018-12-11 22:31:19 -08:00
Michael McLoughlin
c882e52510
printing: commit some refactors (probably broken)
2018-12-11 00:18:22 -08:00