Fix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Tue, 17 Mar 2020 04:51:25 +0000 (00:51 -0400)
committerGitHub <noreply@github.com>
Tue, 17 Mar 2020 04:51:25 +0000 (00:51 -0400)
commit605951267b331c6478626ee6cceeb28a749f0a53
tree29346917a696593c30fc63338dff96cf2b14a606
parent385b4d4296f9c5cb82363565aa210a1a37f92d90
Fix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)

#19219 didn't convert the JIT flags into options on cfg meaning that code currently checked JIT_FLAG_CODE_EXEC_ONLY never executed. Fix handles the new JIT flag in same way as other JIT flags, converted into bit field on cfg.

With this fix, the following C# method:

```
static double Test()
{
    return 1.0f;
}
```

will now generate the following assembly on amd64, when using MONO_ARCH_CODE_EXEC_ONLY:

```
sub rsp,8
mov r11,qword ptr [180003318h]
movsd xmm0,mmword ptr [r11]
add rsp,8
ret
```

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
src/mono/mono/mini/mini-amd64.c
src/mono/mono/mini/mini.c
src/mono/mono/mini/mini.h