summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 16:20:15 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 16:20:15 (GMT)
commit80dac806cc84bb1eab7e3752d9dff3d152281861 (patch)
tree2755dc100485c7de06b6cec73c4f6c6aacc6c9c1 /insns.def
parent5aa52587e86b9e2b03cad8b78307e53b777f1df2 (diff)
revert r63988
Due to trunk-mjit CI failures: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097 http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def58
1 files changed, 25 insertions, 33 deletions
diff --git a/insns.def b/insns.def
index 4c2f909..f048cac 100644
--- a/insns.def
+++ b/insns.def
@@ -43,9 +43,6 @@
* sp_inc: Used to dynamically calculate sp increase in
`insn_stack_increase`.
- * handles_stack: If this is true, JIT makes sure that values are
- set to VM stack.
-
- Attributes can access operands, but not stack (push/pop) variables.
- An instruction's body is a pure C block, copied verbatimly into
@@ -454,7 +451,7 @@ expandarray
(...)
// attr rb_snum_t sp_inc = num - 1 + (flag & 1 ? 1 : 0);
{
- INC_SP(vm_expandarray(GET_SP(), ary, num, (int)flag));
+ vm_expandarray(GET_CFP(), ary, num, (int)flag);
}
/* concat two arrays */
@@ -693,7 +690,6 @@ defineclass
(ID id, ISEQ class_iseq, rb_num_t flags)
(VALUE cbase, VALUE super)
(VALUE val)
-// attr bool handles_stack = true;
{
VALUE klass = vm_find_or_create_class_by_id(id, flags, cbase, super);
@@ -720,7 +716,6 @@ send
(CALL_INFO ci, CALL_CACHE cc, ISEQ blockiseq)
(...)
(VALUE val)
-// attr bool handles_stack = true;
// attr rb_snum_t sp_inc = - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
struct rb_calling_info calling;
@@ -776,7 +771,6 @@ opt_send_without_block
(CALL_INFO ci, CALL_CACHE cc)
(...)
(VALUE val)
-// attr bool handles_stack = true;
// attr rb_snum_t sp_inc = -ci->orig_argc;
{
struct rb_calling_info calling;
@@ -791,7 +785,6 @@ invokesuper
(CALL_INFO ci, CALL_CACHE cc, ISEQ blockiseq)
(...)
(VALUE val)
-// attr bool handles_stack = true;
// attr rb_snum_t sp_inc = - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
struct rb_calling_info calling;
@@ -809,7 +802,6 @@ invokeblock
(CALL_INFO ci)
(...)
(VALUE val)
-// attr bool handles_stack = true;
// attr rb_snum_t sp_inc = 1 - ci->orig_argc;
{
struct rb_calling_info calling;
@@ -836,7 +828,6 @@ leave
()
(VALUE val)
(VALUE val)
-// attr bool handles_stack = true;
{
if (OPT_CHECKED_RUN) {
const VALUE *const bp = vm_base_ptr(reg_cfp);
@@ -998,9 +989,9 @@ opt_plus
val = vm_opt_plus(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1017,9 +1008,9 @@ opt_minus
val = vm_opt_minus(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1036,9 +1027,9 @@ opt_mult
val = vm_opt_mult(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1055,9 +1046,9 @@ opt_div
val = vm_opt_div(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1074,9 +1065,9 @@ opt_mod
val = vm_opt_mod(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1093,9 +1084,9 @@ opt_eq
val = opt_eq_func(recv, obj, ci, cc);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1112,9 +1103,9 @@ opt_neq
val = vm_opt_neq(ci, cc, ci_eq, cc_eq, recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1131,9 +1122,9 @@ opt_lt
val = vm_opt_lt(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1150,9 +1141,9 @@ opt_le
val = vm_opt_le(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1169,9 +1160,9 @@ opt_gt
val = vm_opt_gt(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1188,9 +1179,9 @@ opt_ge
val = vm_opt_ge(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1207,9 +1198,9 @@ opt_ltlt
val = vm_opt_ltlt(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1226,9 +1217,9 @@ opt_aref
val = vm_opt_aref(recv, obj);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1245,10 +1236,10 @@ opt_aset
val = vm_opt_aset(recv, obj, set);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
PUSH(obj);
PUSH(set);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1268,10 +1259,12 @@ opt_aset_with
val = tmp;
}
else {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
PUSH(rb_str_resurrect(key));
+#endif
PUSH(val);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1288,8 +1281,8 @@ opt_aref_with
val = vm_opt_aref_with(recv, key);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
PUSH(rb_str_resurrect(key));
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
@@ -1307,8 +1300,8 @@ opt_length
val = vm_opt_length(recv, BOP_LENGTH);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1325,8 +1318,8 @@ opt_size
val = vm_opt_length(recv, BOP_SIZE);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1343,8 +1336,8 @@ opt_empty_p
val = vm_opt_empty_p(recv);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1361,8 +1354,8 @@ opt_succ
val = vm_opt_succ(recv);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1379,8 +1372,8 @@ opt_not
val = vm_opt_not(ci, cc, recv);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(recv);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1407,9 +1400,9 @@ opt_regexpmatch2
val = vm_opt_regexpmatch2(obj2, obj1);
if (val == Qundef) {
-#ifndef MJIT_HEADER
PUSH(obj2);
PUSH(obj1);
+#ifndef MJIT_HEADER
ADD_PC(-WIDTH_OF_opt_send_without_block);
#endif
DISPATCH_ORIGINAL_INSN(opt_send_without_block);
@@ -1422,7 +1415,6 @@ opt_call_c_function
(rb_insn_func_t funcptr)
()
()
-// attr bool handles_stack = true;
{
reg_cfp = (funcptr)(ec, reg_cfp);