Skip to content

Commit

Permalink
Allocate Windows 64 shadow stack space
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 14, 2020
1 parent ff0e39b commit 0a03291
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,9 @@ static int zend_jit_assign_const_stub(dasm_State **Dst)
uint32_t val_info = MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN;

|->assign_const:
|.if X64
|.if X64WIN
| sub r4, 0x28
|.elif X64
| sub r4, 8
|.else
| sub r4, 12
Expand All @@ -2677,7 +2679,9 @@ static int zend_jit_assign_const_stub(dasm_State **Dst)
0, 0)) {
return 0;
}
|.if X64
|.if X64WIN
| add r4, 0x28
|.elif X64
| add r4, 8
|.else
| add r4, 12
Expand All @@ -2693,7 +2697,9 @@ static int zend_jit_assign_tmp_stub(dasm_State **Dst)
uint32_t val_info = MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN;

|->assign_tmp:
|.if X64
|.if X64WIN
| sub r4, 0x28
|.elif X64
| sub r4, 8
|.else
| sub r4, 12
Expand All @@ -2705,7 +2711,9 @@ static int zend_jit_assign_tmp_stub(dasm_State **Dst)
0, 0)) {
return 0;
}
|.if X64
|.if X64WIN
| add r4, 0x28
|.elif X64
| add r4, 8
|.else
| add r4, 12
Expand All @@ -2721,7 +2729,9 @@ static int zend_jit_assign_var_stub(dasm_State **Dst)
uint32_t val_info = MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF;

|->assign_var:
|.if X64
|.if X64WIN
| sub r4, 0x28
|.elif X64
| sub r4, 8
|.else
| sub r4, 12
Expand All @@ -2733,7 +2743,9 @@ static int zend_jit_assign_var_stub(dasm_State **Dst)
0, 0)) {
return 0;
}
|.if X64
|.if X64WIN
| add r4, 0x28
|.elif X64
| add r4, 8
|.else
| add r4, 12
Expand All @@ -2749,7 +2761,9 @@ static int zend_jit_assign_cv_noref_stub(dasm_State **Dst)
uint32_t val_info = MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN/*|MAY_BE_UNDEF*/;

|->assign_cv_noref:
|.if X64
|.if X64WIN
| sub r4, 0x28
|.elif X64
| sub r4, 8
|.else
| sub r4, 12
Expand All @@ -2761,7 +2775,9 @@ static int zend_jit_assign_cv_noref_stub(dasm_State **Dst)
0, 0)) {
return 0;
}
|.if X64
|.if X64WIN
| add r4, 0x28
|.elif X64
| add r4, 8
|.else
| add r4, 12
Expand All @@ -2777,7 +2793,9 @@ static int zend_jit_assign_cv_stub(dasm_State **Dst)
uint32_t val_info = MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN|MAY_BE_REF/*|MAY_BE_UNDEF*/;

|->assign_cv:
|.if X64
|.if X64WIN
| sub r4, 0x28
|.elif X64
| sub r4, 8
|.else
| sub r4, 12
Expand All @@ -2789,7 +2807,9 @@ static int zend_jit_assign_cv_stub(dasm_State **Dst)
0, 0)) {
return 0;
}
|.if X64
|.if X64WIN
| add r4, 0x28
|.elif X64
| add r4, 8
|.else
| add r4, 12
Expand Down

0 comments on commit 0a03291

Please sign in to comment.