GithubHelp home page GithubHelp logo

jit-compiler's Issues

tests failing with go master

On Linux / AMD 2950X / go1.17-c14ecaca81:

--- FAIL: Test_Execute (0.00s)
    assembler_test.go:297: Expecting 5 got 140256821354496 in [mov u32$5, 0x8(%rsp) return]
           48 c7 44 24 08 05 00 00
          00 c3
FAIL
FAIL	github.com/bspaans/jit-compiler/asm/x86_64	0.003s
ok  	github.com/bspaans/jit-compiler/asm/x86_64/encoding	(cached)
ok  	github.com/bspaans/jit-compiler/asm/x86_64/opcodes	(cached)
ok  	github.com/bspaans/jit-compiler/elf	(cached)
.rodata

.data

.text

_start:

:: __ssa_1 = 25 * 2 ; f = 3 + __ssa_1 ; return f

0x2-0x9 0x24: mov u32$25, %rax
  48 c7 c0 19 00 00 00
0x9-0x10 0x24: mov u32$2, %rcx
  48 c7 c1 02 00 00 00
0x10-0x13 0x24: imul %rcx
  48 f7 e9
0x13-0x16 0x24: mov %rax, %rax
  48 8b c0
0x16-0x1d 0x24: mov u32$3, %rcx
  48 c7 c1 03 00 00 00
0x1d-0x20 0x24: add %rax, %rcx
  48 03 c8
0x20-0x25 0x24: mov %rcx, 0x8(%rsp)
  48 89 4c 24 08
0x25-0x26 0x24: return
  c3

--- FAIL: Test_ParseExecute_Happy (0.00s)
    ir_test.go:308: Expecting 53 got 50 in f = 3 + 25 * 2  after SSA transform
         __ssa_1 = 25 * 2 ; f = 3 + __ssa_1 ; return f
--- FAIL: Test_Execute_Result (0.00s)
    ir_test.go:397: Expecting 53 got 139858457112576 in [if true { f = 53 } else { f = 54 }]
           b2 01 40 80 fa 01 75 09
          48 c7 c1 35 00 00 00 eb
          07 48 c7 c1 36 00 00 00
          48 89 4c 24 08 c3
FAIL
FAIL	github.com/bspaans/jit-compiler/ir	0.042s
FAIL

Support SSA transform

Support SSA transform in the IR

Expressions:

  • and.go
  • arithmetic.go
  • array_index.go
  • bool.go
  • byte_array.go
  • call.go
  • cast.go
  • div.go
  • equals.go
  • float64.go
  • function.go
  • gte.go
  • gt.go
  • int16.go
  • int32.go
  • int64.go
  • int8.go
  • lte.go
  • lt.go
  • mul.go
  • not.go
  • operator.go
  • or.go
  • static_array.go
  • struct_field.go
  • struct.go
  • syscall.go
  • uint16.go
  • uint32.go
  • uint64.go
  • uint8.go
  • variable.go

Statements:

  • and_then.go
  • array_assignment.go
  • assignment.go
  • function_def.go
  • if.go
  • return.go
  • while.go

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.