jdk

Форк
0
/
ad_encode.m4 
89 строк · 3.3 Кб
1
dnl Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
2
dnl DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
dnl
4
dnl This code is free software; you can redistribute it and/or modify it
5
dnl under the terms of the GNU General Public License version 2 only, as
6
dnl published by the Free Software Foundation.
7
dnl
8
dnl This code is distributed in the hope that it will be useful, but WITHOUT
9
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11
dnl version 2 for more details (a copy is included in the LICENSE file that
12
dnl accompanied this code).
13
dnl
14
dnl You should have received a copy of the GNU General Public License version
15
dnl 2 along with this work; if not, write to the Free Software Foundation,
16
dnl Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
dnl
18
dnl Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19
dnl or visit www.oracle.com if you need additional information or have any
20
dnl questions.
21
dnl
22
dnl
23
dnl Process this file with m4 ad_encode.m4 to generate the load/store
24
dnl patterns used in aarch64.ad.
25
dnl
26
define(choose, `loadStore($1, &MacroAssembler::$3, $2, $4,
27
               $5, $6, $7, $8, $9);dnl
28

29
  %}')dnl
30
define(access, `
31
    $3Register $1_reg = as_$3Register($$1$$reg);
32
    $4choose(masm, $1_reg,$2,$mem->opcode(),
33
        as_Register($mem$$base),$mem$$index,$mem$$scale,$mem$$disp,$5)')dnl
34
define(load,`
35
  // This encoding class is generated automatically from ad_encode.m4.
36
  // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
37
  enc_class aarch64_enc_$2($1 dst, memory$5 mem) %{dnl
38
access(dst,$2,$3,$4,$5)')dnl
39
load(iRegI,ldrsbw,,,1)
40
load(iRegI,ldrsb,,,1)
41
load(iRegI,ldrb,,,1)
42
load(iRegL,ldrb,,,1)
43
load(iRegI,ldrshw,,,2)
44
load(iRegI,ldrsh,,,2)
45
load(iRegI,ldrh,,,2)
46
load(iRegL,ldrh,,,2)
47
load(iRegI,ldrw,,,4)
48
load(iRegL,ldrw,,,4)
49
load(iRegL,ldrsw,,,4)
50
load(iRegL,ldr,,,8)
51
load(vRegF,ldrs,Float,,4)
52
load(vRegD,ldrd,Float,,8)
53
define(STORE,`
54
  // This encoding class is generated automatically from ad_encode.m4.
55
  // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
56
  enc_class aarch64_enc_$2($1 src, memory$5 mem) %{dnl
57
access(src,$2,$3,$4,$5)')dnl
58
define(STORE0,`
59
  // This encoding class is generated automatically from ad_encode.m4.
60
  // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
61
  enc_class aarch64_enc_$2`'0(memory$4 mem) %{
62
    choose(masm,zr,$2,$mem->opcode(),
63
        as_$3Register($mem$$base),$mem$$index,$mem$$scale,$mem$$disp,$4)')dnl
64
STORE(iRegI,strb,,,1)
65
STORE0(iRegI,strb,,1)
66
STORE(iRegI,strh,,,2)
67
STORE0(iRegI,strh,,2)
68
STORE(iRegI,strw,,,4)
69
STORE0(iRegI,strw,,4)
70
STORE(iRegL,str,,
71
`// we sometimes get asked to store the stack pointer into the
72
    // current thread -- we cannot do that directly on AArch64
73
    if (src_reg == r31_sp) {
74
      assert(as_Register($mem$$base) == rthread, "unexpected store for sp");
75
      __ mov(rscratch2, sp);
76
      src_reg = rscratch2;
77
    }
78
    ',8)
79
STORE0(iRegL,str,,8)
80
STORE(vRegF,strs,Float,,4)
81
STORE(vRegD,strd,Float,,8)
82

83
  // This encoding class is generated automatically from ad_encode.m4.
84
  // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
85
  enc_class aarch64_enc_strb0_ordered(memory4 mem) %{
86
      __ membar(Assembler::StoreStore);
87
      loadStore(masm, &MacroAssembler::strb, zr, $mem->opcode(),
88
               as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 1);
89
  %}
90

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.