@@ -38,4 +38,44 @@ Cell Deserialize_Cell ();
3838__tvm_slice __tvm_ldu (__tvm_slice slice , int width , int * value );
3939__tvm_slice __tvm_ldi (__tvm_slice slice , int width , int * value );
4040
41+ __attribute__((overloadable , always_inline ))
42+ static void tvm_setreg (int n , int value ) {
43+ __builtin_tvm_setreg (n , value );
44+ }
45+
46+ __attribute__((overloadable , always_inline ))
47+ static void tvm_setreg (int n , __tvm_builder value ) {
48+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_builder (value ));
49+ }
50+
51+ __attribute__((overloadable , always_inline ))
52+ static void tvm_setreg (int n , __tvm_cell value ) {
53+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_cell (value ));
54+ }
55+
56+ __attribute__((overloadable , always_inline ))
57+ static void tvm_setreg (int n , __tvm_slice value ) {
58+ __builtin_tvm_setreg (n , __builtin_tvm_cast_from_slice (value ));
59+ }
60+
61+ __attribute__((overloadable , always_inline ))
62+ static void tvm_setglobal (int n , int value ) {
63+ __builtin_tvm_setglobal (n , value );
64+ }
65+
66+ __attribute__((overloadable , always_inline ))
67+ static void tvm_setglobal (int n , __tvm_builder value ) {
68+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_builder (value ));
69+ }
70+
71+ __attribute__((overloadable , always_inline ))
72+ static void tvm_setglobal (int n , __tvm_cell value ) {
73+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_cell (value ));
74+ }
75+
76+ __attribute__((overloadable , always_inline ))
77+ static void tvm_setglobal (int n , __tvm_slice value ) {
78+ __builtin_tvm_setglobal (n , __builtin_tvm_cast_from_slice (value ));
79+ }
80+
4181#endif
0 commit comments