Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
40
Issues
40
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
884761cd
Commit
884761cd
authored
Nov 16, 2016
by
John Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sext and zext test constant size mistake
parent
6eaefbba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
74 deletions
+74
-74
test_sext.c
tests/test_jit/suite/test_sext.c
+37
-37
test_zext.c
tests/test_jit/suite/test_zext.c
+37
-37
No files found.
tests/test_jit/suite/test_sext.c
View file @
884761cd
...
...
@@ -7,43 +7,43 @@
#include "muapi.h"
#include "mu-fastimpl.h"
int
main
(
int
argc
,
char
**
argv
)
{
MuVM
*
mu_2
0
;
MuCtx
*
ctx_2
0
;
MuIRBuilder
*
bldr_2
0
;
MuID
id_
24
2
;
MuID
id_
24
3
;
MuID
id_
24
4
;
MuID
id_
24
5
;
MuID
id_
24
6
;
MuID
id_
24
7
;
MuID
id_
24
8
;
MuID
id_
24
9
;
MuID
id_
25
0
;
MuID
id_
25
1
;
mu_2
0
=
mu_fastimpl_new
();
ctx_2
0
=
mu_20
->
new_context
(
mu_20
);
bldr_2
0
=
ctx_20
->
new_ir_builder
(
ctx_20
);
id_
242
=
bldr_20
->
gen_sym
(
bldr_20
,
"@i32"
);
bldr_2
0
->
new_type_int
(
bldr_20
,
id_24
2
,
32
);
id_
243
=
bldr_20
->
gen_sym
(
bldr_20
,
"@i64"
);
bldr_2
0
->
new_type_int
(
bldr_20
,
id_24
3
,
64
);
id_
244
=
bldr_20
->
gen_sym
(
bldr_20
,
"@0xa8324b55_i32"
);
bldr_2
0
->
new_const_int
(
bldr_20
,
id_244
,
id_243
,
2821868373
);
id_
245
=
bldr_20
->
gen_sym
(
bldr_20
,
"@sig__i64"
);
bldr_2
0
->
new_funcsig
(
bldr_20
,
id_245
,
NULL
,
0
,
(
MuTypeNode
[
1
]){
id_24
3
},
1
);
id_
246
=
bldr_20
->
gen_sym
(
bldr_20
,
"@test_fnc"
);
bldr_2
0
->
new_func
(
bldr_20
,
id_246
,
id_24
5
);
id_
247
=
bldr_20
->
gen_sym
(
bldr_20
,
"@test_fnc_v1"
);
id_
248
=
bldr_20
->
gen_sym
(
bldr_20
,
"@test_fnc_v1.blk0"
);
id_
249
=
bldr_20
->
gen_sym
(
bldr_20
,
"@test_fnc_v1.blk0.res"
);
id_
250
=
bldr_20
->
gen_sym
(
bldr_20
,
NULL
);
bldr_2
0
->
new_conv
(
bldr_20
,
id_250
,
id_249
,
MU_CONV_SEXT
,
id_242
,
id_243
,
id_24
4
);
id_
251
=
bldr_20
->
gen_sym
(
bldr_20
,
NULL
);
bldr_2
0
->
new_ret
(
bldr_20
,
id_251
,
(
MuVarNode
[
1
]){
id_24
9
},
1
);
bldr_2
0
->
new_bb
(
bldr_20
,
id_248
,
NULL
,
NULL
,
0
,
MU_NO_ID
,
(
MuInstNode
[
2
]){
id_250
,
id_25
1
},
2
);
bldr_2
0
->
new_func_ver
(
bldr_20
,
id_247
,
id_246
,
(
MuBBNode
[
1
]){
id_24
8
},
1
);
bldr_2
0
->
load
(
bldr_20
);
mu_2
0
->
compile_to_sharedlib
(
mu_20
,
"test_sext.dylib"
,
NULL
,
0
);
MuVM
*
mu_2
4
;
MuCtx
*
ctx_2
4
;
MuIRBuilder
*
bldr_2
4
;
MuID
id_
31
2
;
MuID
id_
31
3
;
MuID
id_
31
4
;
MuID
id_
31
5
;
MuID
id_
31
6
;
MuID
id_
31
7
;
MuID
id_
31
8
;
MuID
id_
31
9
;
MuID
id_
32
0
;
MuID
id_
32
1
;
mu_2
4
=
mu_fastimpl_new
();
ctx_2
4
=
mu_24
->
new_context
(
mu_24
);
bldr_2
4
=
ctx_24
->
new_ir_builder
(
ctx_24
);
id_
312
=
bldr_24
->
gen_sym
(
bldr_24
,
"@i32"
);
bldr_2
4
->
new_type_int
(
bldr_24
,
id_31
2
,
32
);
id_
313
=
bldr_24
->
gen_sym
(
bldr_24
,
"@i64"
);
bldr_2
4
->
new_type_int
(
bldr_24
,
id_31
3
,
64
);
id_
314
=
bldr_24
->
gen_sym
(
bldr_24
,
"@0xa8324b55_i32"
);
bldr_2
4
->
new_const_int
(
bldr_24
,
id_314
,
id_312
,
2821868373
);
id_
315
=
bldr_24
->
gen_sym
(
bldr_24
,
"@sig__i64"
);
bldr_2
4
->
new_funcsig
(
bldr_24
,
id_315
,
NULL
,
0
,
(
MuTypeNode
[
1
]){
id_31
3
},
1
);
id_
316
=
bldr_24
->
gen_sym
(
bldr_24
,
"@test_fnc"
);
bldr_2
4
->
new_func
(
bldr_24
,
id_316
,
id_31
5
);
id_
317
=
bldr_24
->
gen_sym
(
bldr_24
,
"@test_fnc_v1"
);
id_
318
=
bldr_24
->
gen_sym
(
bldr_24
,
"@test_fnc_v1.blk0"
);
id_
319
=
bldr_24
->
gen_sym
(
bldr_24
,
"@test_fnc_v1.blk0.res"
);
id_
320
=
bldr_24
->
gen_sym
(
bldr_24
,
NULL
);
bldr_2
4
->
new_conv
(
bldr_24
,
id_320
,
id_319
,
MU_CONV_SEXT
,
id_312
,
id_313
,
id_31
4
);
id_
321
=
bldr_24
->
gen_sym
(
bldr_24
,
NULL
);
bldr_2
4
->
new_ret
(
bldr_24
,
id_321
,
(
MuVarNode
[
1
]){
id_31
9
},
1
);
bldr_2
4
->
new_bb
(
bldr_24
,
id_318
,
NULL
,
NULL
,
0
,
MU_NO_ID
,
(
MuInstNode
[
2
]){
id_320
,
id_32
1
},
2
);
bldr_2
4
->
new_func_ver
(
bldr_24
,
id_317
,
id_316
,
(
MuBBNode
[
1
]){
id_31
8
},
1
);
bldr_2
4
->
load
(
bldr_24
);
mu_2
4
->
compile_to_sharedlib
(
mu_24
,
"test_sext.dylib"
,
NULL
,
0
);
printf
(
"%s
\n
"
,
"test_sext.dylib"
);
return
0
;
}
tests/test_jit/suite/test_zext.c
View file @
884761cd
...
...
@@ -7,43 +7,43 @@
#include "muapi.h"
#include "mu-fastimpl.h"
int
main
(
int
argc
,
char
**
argv
)
{
MuVM
*
mu_2
1
;
MuCtx
*
ctx_2
1
;
MuIRBuilder
*
bldr_2
1
;
MuID
id_
25
2
;
MuID
id_
25
3
;
MuID
id_
25
4
;
MuID
id_
25
5
;
MuID
id_
25
6
;
MuID
id_
25
7
;
MuID
id_
25
8
;
MuID
id_
25
9
;
MuID
id_
26
0
;
MuID
id_
26
1
;
mu_2
1
=
mu_fastimpl_new
();
ctx_2
1
=
mu_21
->
new_context
(
mu_21
);
bldr_2
1
=
ctx_21
->
new_ir_builder
(
ctx_21
);
id_
252
=
bldr_21
->
gen_sym
(
bldr_21
,
"@i32"
);
bldr_2
1
->
new_type_int
(
bldr_21
,
id_25
2
,
32
);
id_
253
=
bldr_21
->
gen_sym
(
bldr_21
,
"@i64"
);
bldr_2
1
->
new_type_int
(
bldr_21
,
id_25
3
,
64
);
id_
254
=
bldr_21
->
gen_sym
(
bldr_21
,
"@0xa8324b55_i32"
);
bldr_2
1
->
new_const_int
(
bldr_21
,
id_254
,
id_253
,
2821868373
);
id_
255
=
bldr_21
->
gen_sym
(
bldr_21
,
"@sig__i64"
);
bldr_2
1
->
new_funcsig
(
bldr_21
,
id_255
,
NULL
,
0
,
(
MuTypeNode
[
1
]){
id_25
3
},
1
);
id_
256
=
bldr_21
->
gen_sym
(
bldr_21
,
"@test_fnc"
);
bldr_2
1
->
new_func
(
bldr_21
,
id_256
,
id_25
5
);
id_
257
=
bldr_21
->
gen_sym
(
bldr_21
,
"@test_fnc_v1"
);
id_
258
=
bldr_21
->
gen_sym
(
bldr_21
,
"@test_fnc_v1.blk0"
);
id_
259
=
bldr_21
->
gen_sym
(
bldr_21
,
"@test_fnc_v1.blk0.res"
);
id_
260
=
bldr_21
->
gen_sym
(
bldr_21
,
NULL
);
bldr_2
1
->
new_conv
(
bldr_21
,
id_260
,
id_259
,
MU_CONV_ZEXT
,
id_252
,
id_253
,
id_25
4
);
id_
261
=
bldr_21
->
gen_sym
(
bldr_21
,
NULL
);
bldr_2
1
->
new_ret
(
bldr_21
,
id_261
,
(
MuVarNode
[
1
]){
id_25
9
},
1
);
bldr_2
1
->
new_bb
(
bldr_21
,
id_258
,
NULL
,
NULL
,
0
,
MU_NO_ID
,
(
MuInstNode
[
2
]){
id_260
,
id_26
1
},
2
);
bldr_2
1
->
new_func_ver
(
bldr_21
,
id_257
,
id_256
,
(
MuBBNode
[
1
]){
id_25
8
},
1
);
bldr_2
1
->
load
(
bldr_21
);
mu_2
1
->
compile_to_sharedlib
(
mu_21
,
"test_zext.dylib"
,
NULL
,
0
);
MuVM
*
mu_2
5
;
MuCtx
*
ctx_2
5
;
MuIRBuilder
*
bldr_2
5
;
MuID
id_
32
2
;
MuID
id_
32
3
;
MuID
id_
32
4
;
MuID
id_
32
5
;
MuID
id_
32
6
;
MuID
id_
32
7
;
MuID
id_
32
8
;
MuID
id_
32
9
;
MuID
id_
33
0
;
MuID
id_
33
1
;
mu_2
5
=
mu_fastimpl_new
();
ctx_2
5
=
mu_25
->
new_context
(
mu_25
);
bldr_2
5
=
ctx_25
->
new_ir_builder
(
ctx_25
);
id_
322
=
bldr_25
->
gen_sym
(
bldr_25
,
"@i32"
);
bldr_2
5
->
new_type_int
(
bldr_25
,
id_32
2
,
32
);
id_
323
=
bldr_25
->
gen_sym
(
bldr_25
,
"@i64"
);
bldr_2
5
->
new_type_int
(
bldr_25
,
id_32
3
,
64
);
id_
324
=
bldr_25
->
gen_sym
(
bldr_25
,
"@0xa8324b55_i32"
);
bldr_2
5
->
new_const_int
(
bldr_25
,
id_324
,
id_322
,
2821868373
);
id_
325
=
bldr_25
->
gen_sym
(
bldr_25
,
"@sig__i64"
);
bldr_2
5
->
new_funcsig
(
bldr_25
,
id_325
,
NULL
,
0
,
(
MuTypeNode
[
1
]){
id_32
3
},
1
);
id_
326
=
bldr_25
->
gen_sym
(
bldr_25
,
"@test_fnc"
);
bldr_2
5
->
new_func
(
bldr_25
,
id_326
,
id_32
5
);
id_
327
=
bldr_25
->
gen_sym
(
bldr_25
,
"@test_fnc_v1"
);
id_
328
=
bldr_25
->
gen_sym
(
bldr_25
,
"@test_fnc_v1.blk0"
);
id_
329
=
bldr_25
->
gen_sym
(
bldr_25
,
"@test_fnc_v1.blk0.res"
);
id_
330
=
bldr_25
->
gen_sym
(
bldr_25
,
NULL
);
bldr_2
5
->
new_conv
(
bldr_25
,
id_330
,
id_329
,
MU_CONV_ZEXT
,
id_322
,
id_323
,
id_32
4
);
id_
331
=
bldr_25
->
gen_sym
(
bldr_25
,
NULL
);
bldr_2
5
->
new_ret
(
bldr_25
,
id_331
,
(
MuVarNode
[
1
]){
id_32
9
},
1
);
bldr_2
5
->
new_bb
(
bldr_25
,
id_328
,
NULL
,
NULL
,
0
,
MU_NO_ID
,
(
MuInstNode
[
2
]){
id_330
,
id_33
1
},
2
);
bldr_2
5
->
new_func_ver
(
bldr_25
,
id_327
,
id_326
,
(
MuBBNode
[
1
]){
id_32
8
},
1
);
bldr_2
5
->
load
(
bldr_25
);
mu_2
5
->
compile_to_sharedlib
(
mu_25
,
"test_zext.dylib"
,
NULL
,
0
);
printf
(
"%s
\n
"
,
"test_zext.dylib"
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment