Giter Site home page Giter Site logo

Comments (3)

mmcloughlin avatar mmcloughlin commented on May 22, 2024

Commit 6d6ff3c includes the license files.

from avo.

dgryski avatar dgryski commented on May 22, 2024

Can xed not yet been used?

from avo.

mmcloughlin avatar mmcloughlin commented on May 22, 2024

Can xed not yet been used?

In retrospect, I wish I had considered XED more seriously. At the time I thought it would be easier to use existing databases with Go support: the Go arch sub-repo and PeachPy's Opcodes XML file. Unfortunately neither of these data sources are quite accurate, so some of the most ugly code in this entire project deals with merging these two sources and fixing up any mistakes. See internal/load/load.go.

To somewhat insulate the rest of the project from this nastyness the output of load.go is written to a Go database package internal/inst. The avogen tool is backed by this database and generates various other files across the project.

Note also that the following test generates a massive file with one instruction per entry in the instruction database and runs it through go tool asm, to confirm compatibility with the toolchain. Writing load.go above was basically a long game of whack-a-mole with this test.

func TestAssembles(t *testing.T) {
g := gen.NewAsmTest(printer.NewArgvConfig())
b, err := g.Generate(inst.Instructions)
if err != nil {
t.Fatal(err)
}
test.Assembles(t, b)
}

Anyway, this is a long way of saying that it should be possible in future to swap out the way the instruction database is generated, since I hope the details of the underlying data sources are contained within internal/load.

I would be interested in revisiting this once the rest of the project is more stable.

from avo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.