aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch
blob: 9dc112a344066329518c18919e999523978e726f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
From d51cb8c0f7966ac0b870e90e421cc8a796d98abf Mon Sep 17 00:00:00 2001
From: Simon South <simon@simonsouth.net>
Date: Tue, 9 Jun 2020 13:48:42 -0400
Subject: [PATCH] Extend AArch64 support

This adds to IcedTea 6 a patch that extends the support for AArch64 in
its version of HotSpot, allowing the portable Zero virtual machine to
be built for that platform.

The patch added is a backport of the one prepared for JDK 9 by the
OpenJDK AArch64 Porting Project, available (as of 11 June 2020) for
download from https://openjdk.java.net/jeps/237.
---
 Makefile.am                                   |    3 +-
 Makefile.in                                   |   12 +-
 .../hs23/aarch64-extended-support.patch       | 1766 +++++++++++++++++
 3 files changed, 1775 insertions(+), 6 deletions(-)
 create mode 100644 patches/hotspot/hs23/aarch64-extended-support.patch

diff --git a/Makefile.am b/Makefile.am
index 97dac85..f5c917b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -621,7 +621,8 @@ ICEDTEA_PATCHES = \
 	patches/openjdk/6260348-pr3068.patch \
 	patches/openjdk/6961123-pr2975.patch \
 	patches/pr2800-missing_resources.patch \
-	patches/pr3213-conditional_arm32jit.patch
+	patches/pr3213-conditional_arm32jit.patch \
+	patches/hotspot/hs23/aarch64-extended-support.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
diff --git a/Makefile.in b/Makefile.in
index aced7c2..e3545ee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1049,11 +1049,13 @@ ICEDTEA_PATCHES = $(DROP_PATCHES) $(SECURITY_PATCHES) \
 	patches/openjdk/6260348-pr3068.patch \
 	patches/openjdk/6961123-pr2975.patch \
 	patches/pr2800-missing_resources.patch \
-	patches/pr3213-conditional_arm32jit.patch $(am__append_21) \
-	$(am__append_22) $(am__append_23) $(am__append_24) \
-	$(am__append_25) $(am__append_26) $(am__append_27) \
-	$(am__append_28) $(am__append_29) $(am__append_30) \
-	$(am__append_31) $(am__append_32) $(DISTRIBUTION_PATCHES)
+	patches/pr3213-conditional_arm32jit.patch \
+	patches/hotspot/hs23/aarch64-extended-support.patch \
+	$(am__append_21) $(am__append_22) $(am__append_23) \
+	$(am__append_24) $(am__append_25) $(am__append_26) \
+	$(am__append_27) $(am__append_28) $(am__append_29) \
+	$(am__append_30) $(am__append_31) $(am__append_32) \
+	$(DISTRIBUTION_PATCHES)
 @ENABLE_NSS_FALSE@NSS_PATCHES = patches/nss-not-enabled-config.patch
 @ENABLE_NSS_TRUE@NSS_PATCHES = patches/nss-config.patch
 
diff --git a/patches/hotspot/hs23/aarch64-extended-support.patch b/patches/hotspot/hs23/aarch64-extended-support.patch
new file mode 100644
index 0000000..7817f4d
--- /dev/null
+++ b/patches/hotspot/hs23/aarch64-extended-support.patch
@@ -0,0 +1,1766 @@
+diff --git openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+index 5771fdd..b23cc17 100644
+--- openjdk.orig/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -304,6 +304,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ #ifdef amd64
+ #define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
+ #endif
++#ifdef aarch64
++#define NPRGREG 32
++#endif
+ #if defined(sparc) || defined(sparcv9)
+ #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
+ #endif
+@@ -406,6 +409,12 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+   regs[REG_INDEX(R_O7)]  = gregs.u_regs[14];
+ #endif /* sparc */
+ 
++#if defined(aarch64)
++
++#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg
++
++#endif /* aarch64 */
++
+ 
+   (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
+   return array;
+diff --git openjdk.orig/hotspot/agent/src/os/linux/libproc.h openjdk/hotspot/agent/src/os/linux/libproc.h
+index e4d77f7..c02b841 100644
+--- openjdk.orig/hotspot/agent/src/os/linux/libproc.h
++++ openjdk/hotspot/agent/src/os/linux/libproc.h
+@@ -54,6 +54,10 @@ struct pt_regs {
+ 
+ #endif //sparc or sparcv9
+ 
++#if defined(aarch64)
++#include "asm/ptrace.h"
++#endif
++
+ /************************************************************************************
+ 
+ 0. This is very minimal subset of Solaris libproc just enough for current application.
+@@ -97,6 +101,9 @@ unsigned long   regs[IA64_REG_COUNT];     /* integer and fp regs */
+ #if defined(sparc)  || defined(sparcv9)
+ #define user_regs_struct  pt_regs
+ #endif
++#if defined(aarch64)
++#define user_regs_struct user_pt_regs
++#endif
+ 
+ // This C bool type must be int for compatibility with Linux calls and
+ // it would be a mistake to equivalence it to C++ bool on many platforms
+diff --git openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 44f21f8..4e8d00b 100644
+--- openjdk.orig/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -232,7 +232,7 @@ ifneq ($(OSNAME),windows)
+ 
+   # Use uname output for SRCARCH, but deal with platform differences. If ARCH
+   # is not explicitly listed below, it is treated as x86. 
+-  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc zero,$(ARCH)))
++  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc aarch64 zero,$(ARCH)))
+   ARCH/       = x86
+   ARCH/sparc  = sparc
+   ARCH/sparc64= sparc
+@@ -242,6 +242,7 @@ ifneq ($(OSNAME),windows)
+   ARCH/ppc64  = ppc
+   ARCH/ppc    = ppc
+   ARCH/arm    = arm
++  ARCH/aarch64= aarch64
+   ARCH/zero   = zero
+ 
+   # BUILDARCH is usually the same as SRCARCH, except for sparcv9
+@@ -267,11 +268,12 @@ ifneq ($(OSNAME),windows)
+   LIBARCH/sparcv9 = sparcv9
+   LIBARCH/ia64    = ia64
+   LIBARCH/ppc64   = ppc
++  LIBARCH/aarch64 = aarch64
+   LIBARCH/ppc     = ppc
+   LIBARCH/arm     = arm
+   LIBARCH/zero    = $(ZERO_LIBARCH)
+ 
+-  LP64_ARCH = sparcv9 amd64 ia64 zero
++  LP64_ARCH = sparcv9 amd64 ia64 aarch64 zero
+ endif
+ 
+ # Required make macro settings for all platforms
+diff --git openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index 7c3d4f9..3bc7e8a 100644
+--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -385,6 +385,7 @@ DATA_MODE/sparc   = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64   = 64
+ DATA_MODE/ia64    = 64
++DATA_MODE/aarch64 = 64
+ DATA_MODE/zero    = $(ARCH_DATA_MODEL)
+ 
+ JAVA_FLAG/32 = -d32
+diff --git openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 7bb3149..39ffda4 100644
+--- openjdk.orig/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -118,6 +118,15 @@ ifeq ($(ARCH), ppc)
+   HS_ARCH          = ppc
+ endif
+ 
++# AARCH64
++ifeq ($(ARCH), aarch64)
++  ARCH_DATA_MODEL  = 64
++  MAKE_ARGS        += LP64=1
++  PLATFORM         = linux-aarch64
++  VM_PLATFORM      = linux_aarch64
++  HS_ARCH          = aarch64
++endif
++
+ # determine if HotSpot is being built in JDK6 or earlier version
+ JDK6_OR_EARLIER=0
+ ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
+diff --git openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index 897e3a6..44f1673 100644
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -104,6 +104,7 @@ endif
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+ ARCHFLAG/i486    = -m32 -march=i586
+ ARCHFLAG/amd64   = -m64
++ARCHFLAG/aarch64 =
+ ARCHFLAG/ia64    =
+ ARCHFLAG/sparc   = -m32 -mcpu=v9
+ ARCHFLAG/sparcv9 = -m64 -mcpu=v9
+diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index c1b0e5c..9f7cda0 100644
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -296,6 +296,8 @@ static char cpu_arch[] = "sparcv9";
+ #  else
+ static char cpu_arch[] = "sparc";
+ #  endif
++#elif defined(AARCH64)
++static char cpu_arch[] = "aarch64";
+ #else
+ #error Add appropriate cpu_arch setting
+ #endif
+@@ -1442,7 +1444,7 @@ void os::Linux::clock_init() {
+ #ifndef SYS_clock_getres
+ 
+ #if defined(IA32) || defined(AMD64)
+-#define SYS_clock_getres IA32_ONLY(266)  AMD64_ONLY(229)
++#define SYS_clock_getres IA32_ONLY(266)  AMD64_ONLY(229) AARCH64_ONLY(114)
+ #define sys_clock_getres(x,y)  ::syscall(SYS_clock_getres, x, y)
+ #else
+ #warning "SYS_clock_getres not defined for this platform, disabling fast_thread_cpu_time"
+@@ -1930,7 +1932,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
+     static  Elf32_Half running_arch_code=EM_AARCH64;
+   #else
+     #error Method os::dll_load requires that one of following is defined:\
+-         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH
++      IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH, AARCH64
+   #endif
+ 
+   // Identify compatability class for VM's architecture and library's architecture
+@@ -3056,7 +3058,7 @@ void os::large_page_init() {
+ 
+ #ifndef ZERO
+     _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M)
+-                       ARM_ONLY(2 * M) PPC_ONLY(4 * M);
++                       ARM_ONLY(2 * M) PPC_ONLY(4 * M) AARCH64_ONLY(2 * M);
+ #endif // ZERO
+ 
+     FILE *fp = fopen("/proc/meminfo", "r");
+@@ -5378,11 +5380,11 @@ void Parker::unpark() {
+ extern char** environ;
+ 
+ #ifndef __NR_fork
+-#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57)
++#define __NR_fork IA32_ONLY(2) IA64_ONLY(not defined) AMD64_ONLY(57) AARCH64_ONLY(1079)
+ #endif
+ 
+ #ifndef __NR_execve
+-#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59)
++#define __NR_execve IA32_ONLY(11) IA64_ONLY(1033) AMD64_ONLY(59) AARCH64_ONLY(221)
+ #endif
+ 
+ // Run the specified command in a separate process. Return its exit value,
+diff --git openjdk.orig/hotspot/src/share/vm/adlc/main.cpp openjdk/hotspot/src/share/vm/adlc/main.cpp
+index 47e207a..b93504e 100644
+--- openjdk.orig/hotspot/src/share/vm/adlc/main.cpp
++++ openjdk/hotspot/src/share/vm/adlc/main.cpp
+@@ -244,6 +244,11 @@ int main(int argc, char *argv[])
+   AD.addInclude(AD._CPP_file, "assembler_arm.inline.hpp");
+   AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp");
+   AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp");
++#endif
++#ifdef TARGET_ARCH_aarch64
++  AD.addInclude(AD._CPP_file, "assembler_aarch64.inline.hpp");
++  AD.addInclude(AD._CPP_file, "nativeInst_aarch64.hpp");
++  AD.addInclude(AD._CPP_file, "vmreg_aarch64.inline.hpp");
+ #endif
+   AD.addInclude(AD._HPP_file, "memory/allocation.hpp");
+   AD.addInclude(AD._HPP_file, "opto/machnode.hpp");
+diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp openjdk/hotspot/src/share/vm/asm/assembler.cpp
+index 2bcdcbc..57787ac 100644
+--- openjdk.orig/hotspot/src/share/vm/asm/assembler.cpp
++++ openjdk/hotspot/src/share/vm/asm/assembler.cpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "assembler_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.inline.hpp"
++#endif
+ 
+ 
+ // Implementation of AbstractAssembler
+diff --git openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp openjdk/hotspot/src/share/vm/asm/assembler.hpp
+index c25aa3f..4f77825 100644
+--- openjdk.orig/hotspot/src/share/vm/asm/assembler.hpp
++++ openjdk/hotspot/src/share/vm/asm/assembler.hpp
+@@ -51,6 +51,10 @@
+ # include "register_ppc.hpp"
+ # include "vm_version_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "register_aarch64.hpp"
++# include "vm_version_aarch64.hpp"
++#endif
+ 
+ // This file contains platform-independent assembler declarations.
+ 
+@@ -459,6 +463,9 @@ class AbstractAssembler : public ResourceObj  {
+ #ifdef TARGET_ARCH_ppc
+ # include "assembler_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.hpp"
++#endif
+ 
+ 
+ #endif // SHARE_VM_ASM_ASSEMBLER_HPP
+diff --git openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp
+index 685297a..002faef 100644
+--- openjdk.orig/hotspot/src/share/vm/asm/codeBuffer.hpp
++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp
+@@ -573,6 +573,9 @@ class CodeBuffer: public StackObj {
+ #ifdef TARGET_ARCH_ppc
+ # include "codeBuffer_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "codeBuffer_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
+index c95a23c..2ec31e5 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
+@@ -877,6 +877,13 @@ static bool match(UnsafeRawOp* x,
+     return false;
+   }
+ 
++// AARCH64 cannot handle shifts which are not either 0, or log2 of the type size
++#ifdef AARCH64
++  if (*log2_scale != 0 &&
++	(1 << *log2_scale) != type2aelembytes(x->basic_type(), true))
++    return false;
++#endif
++
+   // If the value is pinned then it will be always be computed so
+   // there's no profit to reshaping the expression.
+   return !root->is_pinned();
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp
+index bebb3b0..ddaceb7 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Defs.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_Defs.hpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "register_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "register_aarch64.hpp"
++#endif
+ 
+ // set frame size and return address offset to these values in blobs
+ // (if the compiled frame uses ebp as link pointer on IA; otherwise,
+@@ -62,6 +65,9 @@ enum {
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_Defs_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_Defs_aarch64.hpp"
++#endif
+ 
+ 
+ // native word offsets from memory address
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp
+index a1e4c38..491b064 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp
+@@ -44,6 +44,9 @@ class FpuStackSim;
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_FpuStackSim_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_FpuStackSim_aarch64.hpp"
++#endif
+ 
+ 
+ #endif // SHARE_VM_C1_C1_FPUSTACKSIM_HPP
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp
+index ea50b27..6a3dc63 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.cpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ 
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp
+index 288fc5c..e9a0250 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_FrameMap.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_FrameMap.hpp
+@@ -93,6 +93,9 @@ class FrameMap : public CompilationResourceObj {
+ #endif
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_FrameMap_ppc.hpp"
++#endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_FrameMap_aarch64.hpp"
+ #endif
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp
+index 776a6a3..6e1a362 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.cpp
+@@ -67,7 +67,7 @@ FloatRegister LIR_OprDesc::as_double_reg() const {
+ 
+ #endif
+ 
+-#ifdef ARM
++#if defined(ARM) || defined (TARGET_ARCH_aarch64)
+ 
+ FloatRegister LIR_OprDesc::as_float_reg() const {
+   return as_FloatRegister(fpu_regnr());
+@@ -147,7 +147,11 @@ void LIR_Address::verify() const {
+ #endif
+ #ifdef _LP64
+   assert(base()->is_cpu_register(), "wrong base operand");
++#ifndef TARGET_ARCH_aarch64
+   assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand");
++#else
++  assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand");
++#endif
+   assert(base()->type() == T_OBJECT || base()->type() == T_LONG,
+          "wrong type for addresses");
+ #else
+@@ -545,7 +549,7 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
+       assert(opConvert->_info == NULL, "must be");
+       if (opConvert->_opr->is_valid())       do_input(opConvert->_opr);
+       if (opConvert->_result->is_valid())    do_output(opConvert->_result);
+-#ifdef PPC
++#if defined(PPC) || defined(TARGET_ARCH_aarch64)
+       if (opConvert->_tmp1->is_valid())      do_temp(opConvert->_tmp1);
+       if (opConvert->_tmp2->is_valid())      do_temp(opConvert->_tmp2);
+ #endif
+@@ -1468,6 +1472,11 @@ void LIR_OprDesc::print(outputStream* out) const {
+     out->print("fpu%d", fpu_regnr());
+   } else if (is_double_fpu()) {
+     out->print("fpu%d", fpu_regnrLo());
++#elif defined(AARCH64)
++  } else if (is_single_fpu()) {
++    out->print("fpu%d", fpu_regnr());
++  } else if (is_double_fpu()) {
++    out->print("fpu%d", fpu_regnrLo());
+ #elif defined(ARM)
+   } else if (is_single_fpu()) {
+     out->print("s%d", fpu_regnr());
+@@ -1836,7 +1845,7 @@ void LIR_OpConvert::print_instr(outputStream* out) const {
+   print_bytecode(out, bytecode());
+   in_opr()->print(out);                  out->print(" ");
+   result_opr()->print(out);              out->print(" ");
+-#ifdef PPC
++#if defined(PPC) || defined(TARGET_ARCH_aarch64)
+   if(tmp1()->is_valid()) {
+     tmp1()->print(out); out->print(" ");
+     tmp2()->print(out); out->print(" ");
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp
+index f8589c3..eb3383f 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIR.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp
+@@ -437,8 +437,8 @@ class LIR_OprDesc: public CompilationResourceObj {
+   XMMRegister as_xmm_double_reg() const;
+   // for compatibility with RInfo
+   int fpu () const                                  { return lo_reg_half(); }
+-#endif // X86
+-#if defined(SPARC) || defined(ARM) || defined(PPC)
++#endif
++#if defined(SPARC) || defined(ARM) || defined(PPC) || defined(AARCH64)
+   FloatRegister as_float_reg   () const;
+   FloatRegister as_double_reg  () const;
+ #endif
+@@ -526,7 +526,7 @@ class LIR_Address: public LIR_OprPtr {
+      , _type(type)
+      , _disp(0) { verify(); }
+ 
+-#if defined(X86) || defined(ARM)
++#if defined(X86) || defined(ARM) || defined(AARCH64)
+   LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type):
+        _base(base)
+      , _index(index)
+@@ -601,7 +601,7 @@ class LIR_OprFact: public AllStatic {
+                                                                              LIR_OprDesc::fpu_register         |
+                                                                              LIR_OprDesc::double_size); }
+ #endif
+-#ifdef X86
++#if defined(X86) || defined(AARCH64)
+   static LIR_Opr double_fpu(int reg)            { return (LIR_Opr)(intptr_t)((reg  << LIR_OprDesc::reg1_shift) |
+                                                                              (reg  << LIR_OprDesc::reg2_shift) |
+                                                                              LIR_OprDesc::double_type          |
+@@ -1398,7 +1398,7 @@ class LIR_OpConvert: public LIR_Op1 {
+  private:
+    Bytecodes::Code _bytecode;
+    ConversionStub* _stub;
+-#ifdef PPC
++#if defined(PPC) || defined(TARGET_ARCH_aarch64)
+   LIR_Opr _tmp1;
+   LIR_Opr _tmp2;
+ #endif
+@@ -1413,7 +1413,7 @@ class LIR_OpConvert: public LIR_Op1 {
+ #endif
+      , _bytecode(code)                           {}
+ 
+-#ifdef PPC
++#if defined(PPC) || defined(TARGET_ARCH_aarch64)
+    LIR_OpConvert(Bytecodes::Code code, LIR_Opr opr, LIR_Opr result, ConversionStub* stub
+                  ,LIR_Opr tmp1, LIR_Opr tmp2)
+      : LIR_Op1(lir_convert, opr, result)
+@@ -1425,7 +1425,7 @@ class LIR_OpConvert: public LIR_Op1 {
+ 
+   Bytecodes::Code bytecode() const               { return _bytecode; }
+   ConversionStub* stub() const                   { return _stub; }
+-#ifdef PPC
++#if defined(PPC) || defined(TARGET_ARCH_aarch64)
+   LIR_Opr tmp1() const                           { return _tmp1; }
+   LIR_Opr tmp2() const                           { return _tmp2; }
+ #endif
+@@ -1973,7 +1973,14 @@ class LIR_List: public CompilationResourceObj {
+ #ifdef PPC
+   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); }
+ #endif
++#if defined (TARGET_ARCH_aarch64)
++  void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst,
++	       ConversionStub* stub = NULL, LIR_Opr tmp1 = LIR_OprDesc::illegalOpr()) {
++    append(new LIR_OpConvert(code, left, dst, stub, tmp1, LIR_OprDesc::illegalOpr()));
++  }
++#else
+   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); }
++#endif
+ 
+   void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and,  left, right, dst)); }
+   void logical_or  (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or,   left, right, dst)); }
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
+index 528f21e..4d83fca 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
+@@ -50,6 +50,10 @@
+ # include "nativeInst_ppc.hpp"
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ 
+ 
+ void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
+index 58adf59..f4a49b3 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
+@@ -261,6 +261,9 @@ class LIR_Assembler: public CompilationResourceObj {
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_LIRAssembler_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_LIRAssembler_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp
+index aaae71d..93f9f5f 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ 
+ 
+ #ifndef PRODUCT
+@@ -2190,7 +2193,7 @@ LIR_Opr LinearScan::color_lir_opr(LIR_Opr opr, int op_id, LIR_OpVisitState::OprM
+ 
+   LIR_Opr res = operand_for_interval(interval);
+ 
+-#ifdef X86
++#if defined(X86) || defined(AARCH64)
+   // new semantic for is_last_use: not only set on definite end of interval,
+   // but also before hole
+   // This may still miss some cases (e.g. for dead values), but it is not necessary that the
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp
+index 0c06f1b..a152328 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_LinearScan.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.hpp
+@@ -985,6 +985,9 @@ class LinearScanTimers : public StackObj {
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_LinearScan_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_LinearScan_aarch64.hpp"
++#endif
+ 
+ 
+ #endif // SHARE_VM_C1_C1_LINEARSCAN_HPP
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp
+index 55d9803..eda2174 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "assembler_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.inline.hpp"
++#endif
+ 
+ class CodeEmitInfo;
+ 
+@@ -73,6 +76,9 @@ class C1_MacroAssembler: public MacroAssembler {
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_MacroAssembler_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_MacroAssembler_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp
+index 765dec4..f0b3aae 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.cpp
++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp
+@@ -1103,6 +1103,7 @@ JRT_END
+ // completes we can check for deoptimization. This simplifies the
+ // assembly code in the cpu directories.
+ //
++#ifndef TARGET_ARCH_aarch64
+ int Runtime1::move_klass_patching(JavaThread* thread) {
+ //
+ // NOTE: we are still in Java
+@@ -1150,6 +1151,7 @@ int Runtime1::access_field_patching(JavaThread* thread) {
+ 
+   return caller_is_deopted();
+ JRT_END
++#endif
+ 
+ 
+ JRT_LEAF(void, Runtime1::trace_block_entry(jint block_id))
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp
+index 2032564..19261be 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_Runtime1.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.hpp
+@@ -159,6 +159,9 @@ class Runtime1: public AllStatic {
+   static int move_klass_patching(JavaThread* thread);
+ 
+   static void patch_code(JavaThread* thread, StubID stub_id);
++#ifdef TARGET_ARCH_aarch64
++  static void patch_code_aarch64(JavaThread* thread, StubID stub_id);
++#endif
+ 
+  public:
+   // initialization
+diff --git openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp openjdk/hotspot/src/share/vm/c1/c1_globals.hpp
+index 15f3cc1..4143a87 100644
+--- openjdk.orig/hotspot/src/share/vm/c1/c1_globals.hpp
++++ openjdk/hotspot/src/share/vm/c1/c1_globals.hpp
+@@ -38,6 +38,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_globals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_globals_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "c1_globals_linux.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp
+index cf6f0e5..b128b3a 100644
+--- openjdk.orig/hotspot/src/share/vm/classfile/classFileStream.hpp
++++ openjdk/hotspot/src/share/vm/classfile/classFileStream.hpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ // Input stream for reading .class file
+ //
+diff --git openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp
+index f876029..ac415b6 100644
+--- openjdk.orig/hotspot/src/share/vm/classfile/stackMapTable.hpp
++++ openjdk/hotspot/src/share/vm/classfile/stackMapTable.hpp
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ class StackMapReader;
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp openjdk/hotspot/src/share/vm/classfile/verifier.cpp
+index c5c5e11..9c22a21 100644
+--- openjdk.orig/hotspot/src/share/vm/classfile/verifier.cpp
++++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp
+@@ -60,6 +60,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ #define NOFAILOVER_MAJOR_VERSION 51
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp openjdk/hotspot/src/share/vm/code/codeBlob.cpp
+index 244c320..429e0be 100644
+--- openjdk.orig/hotspot/src/share/vm/code/codeBlob.cpp
++++ openjdk/hotspot/src/share/vm/code/codeBlob.cpp
+@@ -54,6 +54,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++#endif
+ #ifdef COMPILER1
+ #include "c1/c1_Runtime1.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp openjdk/hotspot/src/share/vm/code/compiledIC.hpp
+index fe1cfb3..c9f6a2e 100644
+--- openjdk.orig/hotspot/src/share/vm/code/compiledIC.hpp
++++ openjdk/hotspot/src/share/vm/code/compiledIC.hpp
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++#endif
+ 
+ //-----------------------------------------------------------------------------
+ // The CompiledIC represents a compiled inline cache.
+diff --git openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp openjdk/hotspot/src/share/vm/code/icBuffer.cpp
+index ed70457..d022482 100644
+--- openjdk.orig/hotspot/src/share/vm/code/icBuffer.cpp
++++ openjdk/hotspot/src/share/vm/code/icBuffer.cpp
+@@ -52,6 +52,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "assembler_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.inline.hpp"
++#endif
+ 
+ 
+ DEF_STUB_INTERFACE(ICStub);
+diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp openjdk/hotspot/src/share/vm/code/relocInfo.cpp
+index 4fd82df..78310e6 100644
+--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.cpp
++++ openjdk/hotspot/src/share/vm/code/relocInfo.cpp
+@@ -49,6 +49,10 @@
+ # include "assembler_ppc.inline.hpp"
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.inline.hpp"
++# include "nativeInst_aarch64.hpp"
++#endif
+ 
+ 
+ const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
+diff --git openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp openjdk/hotspot/src/share/vm/code/relocInfo.hpp
+index 1d14b44..3823889 100644
+--- openjdk.orig/hotspot/src/share/vm/code/relocInfo.hpp
++++ openjdk/hotspot/src/share/vm/code/relocInfo.hpp
+@@ -435,6 +435,9 @@ class relocInfo VALUE_OBJ_CLASS_SPEC {
+ #endif
+ #ifdef TARGET_ARCH_ppc
+ # include "relocInfo_ppc.hpp"
++#endif
++#ifdef TARGET_ARCH_aarch64
++# include "relocInfo_aarch64.hpp"
+ #endif
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp openjdk/hotspot/src/share/vm/code/vmreg.hpp
+index d57e6f8..1c18e47 100644
+--- openjdk.orig/hotspot/src/share/vm/code/vmreg.hpp
++++ openjdk/hotspot/src/share/vm/code/vmreg.hpp
+@@ -42,6 +42,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "register_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "register_aarch64.hpp"
++#endif
+ #ifdef COMPILER2
+ #include "opto/adlcVMDeps.hpp"
+ #include "utilities/ostream.hpp"
+@@ -63,6 +66,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/adGlobals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/adGlobals_aarch64.hpp"
++#endif
+ #endif
+ 
+ //------------------------------VMReg------------------------------------------
+@@ -182,6 +188,9 @@ public:
+ #ifdef TARGET_ARCH_ppc
+ # include "vmreg_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmreg_aarch64.hpp"
++#endif
+ 
+ 
+ };
+diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp openjdk/hotspot/src/share/vm/compiler/disassembler.cpp
+index 9603e86..3a67259 100644
+--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.cpp
++++ openjdk/hotspot/src/share/vm/compiler/disassembler.cpp
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "depChecker_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "depChecker_aarch64.hpp"
++#endif
+ #ifdef SHARK
+ #include "shark/sharkEntry.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp openjdk/hotspot/src/share/vm/compiler/disassembler.hpp
+index a70b8cc..4c90c9a 100644
+--- openjdk.orig/hotspot/src/share/vm/compiler/disassembler.hpp
++++ openjdk/hotspot/src/share/vm/compiler/disassembler.hpp
+@@ -78,6 +78,9 @@ class Disassembler {
+ #endif
+ #ifdef TARGET_ARCH_ppc
+ # include "disassembler_ppc.hpp"
++#endif
++#ifdef TARGET_ARCH_aarch64
++# include "disassembler_aarch64.hpp"
+ #endif
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
+index d23f37a..24ca30e 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/abstractInterpreter.hpp
+@@ -44,6 +44,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "interp_masm_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "interp_masm_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp
+index 107161a..205d0f7 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecode.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/bytecode.hpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ class ciBytecodeStream;
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
+index e637414..308ad3b 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ #ifdef CC_INTERP
+ 
+@@ -618,6 +621,9 @@ void print();
+ #ifdef TARGET_ARCH_ppc
+ # include "bytecodeInterpreter_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytecodeInterpreter_aarch64.hpp"
++#endif
+ 
+ 
+ }; // BytecodeInterpreter
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp
+index 3715a52..0d6a8aa 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp
+@@ -58,6 +58,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytecodeInterpreter_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytecodeInterpreter_aarch64.inline.hpp"
++#endif
+ 
+ #endif // CC_INTERP
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp
+index 6106eac..f3dee0a 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeStream.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeStream.hpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ // A BytecodeStream is used for fast iteration over the bytecodes
+ // of a methodOop.
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp
+index 04f3f64..48ef30e 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodes.cpp
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodes.cpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ 
+ #if defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER < 1600))
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp
+index e3a9f2e..8347473 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreter.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.hpp
+@@ -101,6 +101,9 @@ class CppInterpreter: public AbstractInterpreter {
+ #ifdef TARGET_ARCH_ppc
+ # include "cppInterpreter_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "cppInterpreter_aarch64.hpp"
++#endif
+ 
+ 
+ };
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp
+index c27805e..272f6e8 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp
+@@ -59,6 +59,9 @@ class CppInterpreterGenerator: public AbstractInterpreterGenerator {
+ #ifdef TARGET_ARCH_ppc
+ # include "cppInterpreterGenerator_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "cppInterpreterGenerator_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp
+index 0ab0be7..6a6822f 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreter.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/interpreter.hpp
+@@ -158,6 +158,9 @@ class Interpreter: public CC_INTERP_ONLY(CppInterpreter) NOT_CC_INTERP(TemplateI
+ #ifdef TARGET_ARCH_ppc
+ # include "interpreter_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "interpreter_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp
+index 7bc43ec..0434ca3 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp
+@@ -56,6 +56,9 @@ InterpreterGenerator(StubQueue* _code);
+ #ifdef TARGET_ARCH_ppc
+ # include "interpreterGenerator_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "interpreterGenerator_aarch64.hpp"
++#endif
+ 
+ 
+ };
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+index e451c04..37700fb 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+@@ -71,6 +71,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vm_version_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vm_version_aarch64.hpp"
++#endif
+ #ifdef COMPILER2
+ #include "opto/runtime.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp
+index 93c1a9e..425400e 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/interpreterRuntime.hpp
+@@ -164,6 +164,9 @@ class InterpreterRuntime: AllStatic {
+ #endif
+ #ifdef TARGET_ARCH_ppc
+ # include "interpreterRT_ppc.hpp"
++#endif
++#ifdef TARGET_ARCH_aarch64
++# include "interpreterRT_aarch64.hpp"
+ #endif
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp
+index 25d74f7..f78a16e 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreter.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreter.hpp
+@@ -198,6 +198,9 @@ class TemplateInterpreter: public AbstractInterpreter {
+ #ifdef TARGET_ARCH_ppc
+ # include "templateInterpreter_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "templateInterpreter_aarch64.hpp"
++#endif
+ 
+ 
+ };
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp
+index fb7bdc5..6007630 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp
+@@ -101,6 +101,9 @@ class TemplateInterpreterGenerator: public AbstractInterpreterGenerator {
+ #ifdef TARGET_ARCH_ppc
+ # include "templateInterpreterGenerator_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "templateInterpreterGenerator_aarch64.hpp"
++#endif
+ 
+ 
+ };
+diff --git openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp
+index 5d2a7e8..c5e0f0a 100644
+--- openjdk.orig/hotspot/src/share/vm/interpreter/templateTable.hpp
++++ openjdk/hotspot/src/share/vm/interpreter/templateTable.hpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "interp_masm_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "interp_masm_aarch64.hpp"
++#endif
+ 
+ #ifndef CC_INTERP
+ // All the necessary definitions used for (bytecode) template generation. Instead of
+@@ -373,6 +376,9 @@ class TemplateTable: AllStatic {
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "templateTable_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "templateTable_aarch64.hpp"
++#endif
+ 
+ };
+ #endif /* !CC_INTERP */
+diff --git openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp
+index c2f985d..3d0d0fc 100644
+--- openjdk.orig/hotspot/src/share/vm/oops/constantPoolOop.hpp
++++ openjdk/hotspot/src/share/vm/oops/constantPoolOop.hpp
+@@ -45,6 +45,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ // A constantPool is an array containing class constants as described in the
+ // class file.
+diff --git openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp openjdk/hotspot/src/share/vm/oops/oop.inline.hpp
+index db14b2e..c8b326f 100644
+--- openjdk.orig/hotspot/src/share/vm/oops/oop.inline.hpp
++++ openjdk/hotspot/src/share/vm/oops/oop.inline.hpp
+@@ -58,6 +58,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ // Implementation of all inlined member functions defined in oop.hpp
+ // We need a separate file to avoid circular references
+diff --git openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp
+index fc73160..2c5ec41 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/buildOopMap.cpp
++++ openjdk/hotspot/src/share/vm/opto/buildOopMap.cpp
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ 
+ // The functions in this file builds OopMaps after all scheduling is done.
+ //
+diff --git openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp openjdk/hotspot/src/share/vm/opto/c2_globals.hpp
+index f73dcbd..462c875 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/c2_globals.hpp
++++ openjdk/hotspot/src/share/vm/opto/c2_globals.hpp
+@@ -35,6 +35,9 @@
+ #ifdef TARGET_ARCH_arm
+ # include "c2_globals_arm.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c2_globals_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "c2_globals_linux.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp openjdk/hotspot/src/share/vm/opto/c2compiler.cpp
+index 713e3f1..948e447 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/c2compiler.cpp
++++ openjdk/hotspot/src/share/vm/opto/c2compiler.cpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ 
+ volatile int C2Compiler::_runtimes = uninitialized;
+diff --git openjdk.orig/hotspot/src/share/vm/opto/compile.cpp openjdk/hotspot/src/share/vm/opto/compile.cpp
+index a7ee07a..91dc290 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/compile.cpp
++++ openjdk/hotspot/src/share/vm/opto/compile.cpp
+@@ -80,6 +80,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ 
+ // -------------------- Compile::mach_constant_base_node -----------------------
+diff --git openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp openjdk/hotspot/src/share/vm/opto/gcm.cpp
+index 8b8f311..4deb0b4 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/gcm.cpp
++++ openjdk/hotspot/src/share/vm/opto/gcm.cpp
+@@ -53,6 +53,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ // Portions of code courtesy of Clifford Click
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp openjdk/hotspot/src/share/vm/opto/lcm.cpp
+index aee6123..4b9aaed 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/lcm.cpp
++++ openjdk/hotspot/src/share/vm/opto/lcm.cpp
+@@ -48,6 +48,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ // Optimization - Graph Style
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp openjdk/hotspot/src/share/vm/opto/locknode.hpp
+index 91b99bc..665594f 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/locknode.hpp
++++ openjdk/hotspot/src/share/vm/opto/locknode.hpp
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ //------------------------------BoxLockNode------------------------------------
+ class BoxLockNode : public Node {
+diff --git openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp openjdk/hotspot/src/share/vm/opto/matcher.cpp
+index ca2d4e3..d0f55c5 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/matcher.cpp
++++ openjdk/hotspot/src/share/vm/opto/matcher.cpp
+@@ -55,6 +55,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ OptoReg::Name OptoReg::c_frame_pointer;
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/opto/output.hpp openjdk/hotspot/src/share/vm/opto/output.hpp
+index 50b6e76..6a920b2 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/output.hpp
++++ openjdk/hotspot/src/share/vm/opto/output.hpp
+@@ -45,6 +45,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ class Arena;
+ class Bundle;
+diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp openjdk/hotspot/src/share/vm/opto/regmask.cpp
+index ce220f0..20c6028 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/regmask.cpp
++++ openjdk/hotspot/src/share/vm/opto/regmask.cpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ #define RM_SIZE _RM_SIZE /* a constant private to the class RegMask */
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp openjdk/hotspot/src/share/vm/opto/regmask.hpp
+index e50ff84..26c6854 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/regmask.hpp
++++ openjdk/hotspot/src/share/vm/opto/regmask.hpp
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/adGlobals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/adGlobals_aarch64.hpp"
++#endif
+ 
+ // Some fun naming (textual) substitutions:
+ //
+diff --git openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp openjdk/hotspot/src/share/vm/opto/runtime.cpp
+index d315f10..11a58b1 100644
+--- openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp
++++ openjdk/hotspot/src/share/vm/opto/runtime.cpp
+@@ -86,6 +86,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ 
+ 
+ // For debugging purposes:
+diff --git openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp openjdk/hotspot/src/share/vm/prims/jniCheck.cpp
+index 3bf4ecd..2ad9014 100644
+--- openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp
++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp
+@@ -51,6 +51,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "jniTypes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "jniTypes_aarch64.hpp"
++#endif
+ 
+ 
+ // Heap objects are allowed to be directly referenced only in VM code,
+diff --git openjdk.orig/hotspot/src/share/vm/prims/jni_md.h openjdk/hotspot/src/share/vm/prims/jni_md.h
+index 7fa5829..3bd4e31 100644
+--- openjdk.orig/hotspot/src/share/vm/prims/jni_md.h
++++ openjdk/hotspot/src/share/vm/prims/jni_md.h
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "jni_ppc.h"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "jni_aarch64.h"
++#endif
+ 
+ 
+ /*
+diff --git openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
+index 97dd154..fd1fa43 100644
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
++++ openjdk/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
+@@ -43,6 +43,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ // FIXME: add Deprecated, LVTT attributes
+ // FIXME: fix Synthetic attribute
+ // FIXME: per Serguei, add error return handling for constantPoolOopDesc::copy_cpool_bytes()
+diff --git openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp openjdk/hotspot/src/share/vm/prims/methodHandles.hpp
+index 514ba6a..ea747d0 100644
+--- openjdk.orig/hotspot/src/share/vm/prims/methodHandles.hpp
++++ openjdk/hotspot/src/share/vm/prims/methodHandles.hpp
+@@ -738,6 +738,9 @@ public:
+ #ifdef TARGET_ARCH_ppc
+ # include "methodHandles_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "methodHandles_aarch64.hpp"
++#endif
+ };
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp openjdk/hotspot/src/share/vm/runtime/atomic.cpp
+index 80780d7..5a34f15 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/atomic.cpp
++++ openjdk/hotspot/src/share/vm/runtime/atomic.cpp
+@@ -60,6 +60,9 @@
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "atomic_linux_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "atomic_linux_aarch64.inline.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "atomic_bsd_x86.inline.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp
+index 4735588..4e7958a 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/deoptimization.cpp
++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp
+@@ -65,6 +65,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ #ifdef COMPILER2
+ #ifdef TARGET_ARCH_MODEL_x86_32
+ # include "adfiles/ad_x86_32.hpp"
+@@ -84,6 +87,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/ad_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/ad_aarch64.hpp"
++#endif
+ #endif
+ 
+ bool DeoptimizationMarker::_is_active = false;
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
+index bff4310..1129cd6 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
++++ openjdk/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++#endif
+ 
+ class RegisteredProbes;
+ typedef jlong OpaqueProbes;
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp openjdk/hotspot/src/share/vm/runtime/frame.cpp
+index 7ae9aa8..6654714 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.cpp
++++ openjdk/hotspot/src/share/vm/runtime/frame.cpp
+@@ -59,6 +59,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++#endif
+ 
+ RegisterMap::RegisterMap(JavaThread *thread, bool update_map) {
+   _thread         = thread;
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp openjdk/hotspot/src/share/vm/runtime/frame.hpp
+index c55380e..c13caae 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.hpp
++++ openjdk/hotspot/src/share/vm/runtime/frame.hpp
+@@ -50,6 +50,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/adGlobals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/adGlobals_aarch64.hpp"
++#endif
+ #endif
+ #ifdef ZERO
+ #ifdef TARGET_ARCH_zero
+@@ -491,6 +494,9 @@ class frame VALUE_OBJ_CLASS_SPEC {
+ #ifdef TARGET_ARCH_ppc
+ # include "frame_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "frame_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp
+index b80b042..f6e1b0e 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/frame.inline.hpp
++++ openjdk/hotspot/src/share/vm/runtime/frame.inline.hpp
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "jniTypes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "jniTypes_aarch64.hpp"
++#endif
+ #ifdef ZERO
+ #ifdef TARGET_ARCH_zero
+ # include "entryFrame_zero.hpp"
+@@ -100,6 +103,9 @@ inline bool frame::is_first_frame() const {
+ #ifdef TARGET_ARCH_ppc
+ # include "frame_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "frame_aarch64.inline.hpp"
++#endif
+ 
+ 
+ #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
+index 10d74cd..4cc5dfb 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp
+@@ -52,6 +52,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "globals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "globals_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "globals_linux.hpp"
+ #endif
+@@ -88,6 +91,9 @@
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "globals_linux_ppc.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "globals_linux_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "globals_bsd_x86.hpp"
+ #endif
+@@ -107,6 +113,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "c1_globals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c1_globals_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "c1_globals_linux.hpp"
+ #endif
+@@ -130,6 +139,9 @@
+ #ifdef TARGET_ARCH_arm
+ # include "c2_globals_arm.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "c2_globals_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "c2_globals_linux.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp openjdk/hotspot/src/share/vm/runtime/icache.hpp
+index d460a0f..9a3b9c8 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/icache.hpp
++++ openjdk/hotspot/src/share/vm/runtime/icache.hpp
+@@ -83,6 +83,9 @@ class AbstractICache : AllStatic {
+ #ifdef TARGET_ARCH_ppc
+ # include "icache_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "icache_aarch64.hpp"
++#endif
+ 
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/java.cpp openjdk/hotspot/src/share/vm/runtime/java.cpp
+index fc3b67a..46794b0 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/java.cpp
++++ openjdk/hotspot/src/share/vm/runtime/java.cpp
+@@ -78,6 +78,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vm_version_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vm_version_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp
+index d4f8595..bc2ca9b 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/javaCalls.hpp
++++ openjdk/hotspot/src/share/vm/runtime/javaCalls.hpp
+@@ -45,6 +45,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "jniTypes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "jniTypes_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp
+index 8374aa2..6be5f79 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp
++++ openjdk/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp
+@@ -47,6 +47,9 @@
+ #ifdef TARGET_OS_ARCH_linux_arm
+ # include "orderAccess_linux_arm.inline.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "orderAccess_linux_aarch64.inline.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "orderAccess_linux_ppc.inline.hpp"
+ #endif
+@@ -121,6 +124,9 @@ friend class JavaCallWrapper;
+ #ifdef TARGET_ARCH_ppc
+ # include "javaFrameAnchor_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "javaFrameAnchor_aarch64.hpp"
++#endif
+ 
+ 
+ public:
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp
+index 5867deb..0f1fbb4 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp
++++ openjdk/hotspot/src/share/vm/runtime/os.hpp
+@@ -719,6 +719,9 @@ class os: AllStatic {
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "os_linux_ppc.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "os_linux_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "os_bsd_x86.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp openjdk/hotspot/src/share/vm/runtime/registerMap.hpp
+index 5dd677a..7bd425f 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/registerMap.hpp
++++ openjdk/hotspot/src/share/vm/runtime/registerMap.hpp
+@@ -42,6 +42,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "register_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "register_aarch64.hpp"
++#endif
+ 
+ class JavaThread;
+ 
+@@ -150,6 +153,9 @@ class RegisterMap : public StackObj {
+ #ifdef TARGET_ARCH_ppc
+ # include "registerMap_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "registerMap_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp openjdk/hotspot/src/share/vm/runtime/relocator.hpp
+index c34866f..790bd80 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/relocator.hpp
++++ openjdk/hotspot/src/share/vm/runtime/relocator.hpp
+@@ -42,6 +42,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "bytes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "bytes_aarch64.hpp"
++#endif
+ 
+ // This code has been converted from the 1.1E java virtual machine
+ // Thanks to the JavaTopics group for using the code
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp
+index c29d257..a842bb3 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp
++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp
+@@ -70,6 +70,10 @@
+ # include "nativeInst_ppc.hpp"
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+index c25dcfe..aa7caff 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp
++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+@@ -76,6 +76,10 @@
+ # include "nativeInst_ppc.hpp"
+ # include "vmreg_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++# include "vmreg_aarch64.inline.hpp"
++#endif
+ #ifdef COMPILER1
+ #include "c1/c1_Runtime1.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp
+index 110f712..779f994 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/stackValueCollection.cpp
++++ openjdk/hotspot/src/share/vm/runtime/stackValueCollection.cpp
+@@ -39,6 +39,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "jniTypes_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "jniTypes_aarch64.hpp"
++#endif
+ 
+ jint StackValueCollection::int_at(int slot) const {
+   intptr_t val =  at(slot)->get_int();
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp openjdk/hotspot/src/share/vm/runtime/statSampler.cpp
+index 0b24def..c82a214 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/statSampler.cpp
++++ openjdk/hotspot/src/share/vm/runtime/statSampler.cpp
+@@ -48,6 +48,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vm_version_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vm_version_aarch64.hpp"
++#endif
+ 
+ // --------------------------------------------------------
+ // StatSamplerTask
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
+index b6068a5..4ef7e38 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
++++ openjdk/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
+@@ -42,6 +42,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "assembler_ppc.inline.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "assembler_aarch64.inline.hpp"
++#endif
+ 
+ 
+ // Implementation of StubCodeDesc
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp
+index 8481dce..f233b56 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/stubRoutines.hpp
++++ openjdk/hotspot/src/share/vm/runtime/stubRoutines.hpp
+@@ -46,6 +46,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "nativeInst_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "nativeInst_aarch64.hpp"
++#endif
+ 
+ // StubRoutines provides entry points to assembly routines used by
+ // compiled code and the run-time system. Platform-specific entry
+@@ -116,6 +119,9 @@ class StubRoutines: AllStatic {
+ #endif
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "stubRoutines_ppc.hpp"
++#endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "stubRoutines_aarch64.hpp"
+ #endif
+ 
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp openjdk/hotspot/src/share/vm/runtime/thread.hpp
+index 7846cc0..6964c22 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/thread.hpp
++++ openjdk/hotspot/src/share/vm/runtime/thread.hpp
+@@ -1651,6 +1651,9 @@ public:
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "thread_linux_ppc.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "thread_linux_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "thread_bsd_x86.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp
+index c2f7a9e..26ef559 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/threadLocalStorage.hpp
++++ openjdk/hotspot/src/share/vm/runtime/threadLocalStorage.hpp
+@@ -68,6 +68,9 @@ class ThreadLocalStorage : AllStatic {
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "threadLS_linux_ppc.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "threadLS_linux_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "threadLS_bsd_x86.hpp"
+ #endif
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp
+index 8afd933..359f9fc 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/vmStructs.cpp
++++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp
+@@ -125,6 +125,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vmStructs_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vmStructs_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_FAMILY_linux
+ # include "thread_linux.inline.hpp"
+ #endif
+@@ -161,6 +164,9 @@
+ #ifdef TARGET_OS_ARCH_linux_ppc
+ # include "vmStructs_linux_ppc.hpp"
+ #endif
++#ifdef TARGET_OS_ARCH_linux_aarch64
++# include "vmStructs_linux_aarch64.hpp"
++#endif
+ #ifdef TARGET_OS_ARCH_bsd_x86
+ # include "vmStructs_bsd_x86.hpp"
+ #endif
+@@ -221,6 +227,9 @@
+ #ifdef TARGET_ARCH_MODEL_ppc
+ # include "adfiles/adGlobals_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_MODEL_aarch64
++# include "adfiles/adGlobals_aarch64.hpp"
++#endif
+ #endif
+ 
+ // Note: the cross-product of (c1, c2, product, nonproduct, ...),
+diff --git openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp
+index 2d51b67..bba9b01 100644
+--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp
++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp
+@@ -41,6 +41,9 @@
+ #ifdef TARGET_ARCH_ppc
+ # include "vm_version_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "vm_version_aarch64.hpp"
++#endif
+ 
+ const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
+ const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
+@@ -185,6 +188,7 @@ const char* Abstract_VM_Version::jre_release_version() {
+                  AMD64_ONLY("amd64")             \
+                  ARM_ONLY("arm")                 \
+                  PPC_ONLY("ppc")                 \
++                 AARCH64_ONLY("aarch64")         \
+                  SPARC_ONLY("sparc")
+ #endif // ZERO
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp openjdk/hotspot/src/share/vm/utilities/copy.hpp
+index 3dcbfee..198590f 100644
+--- openjdk.orig/hotspot/src/share/vm/utilities/copy.hpp
++++ openjdk/hotspot/src/share/vm/utilities/copy.hpp
+@@ -337,6 +337,9 @@ class Copy : AllStatic {
+ #ifdef TARGET_ARCH_ppc
+ # include "copy_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "copy_aarch64.hpp"
++#endif
+ 
+ };
+ 
+diff --git openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+index b55b0ac..5d11e26 100644
+--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions.hpp
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+@@ -346,6 +346,9 @@ extern int LogMinObjAlignmentInBytes;
+ #ifdef TARGET_ARCH_ppc
+ # include "globalDefinitions_ppc.hpp"
+ #endif
++#ifdef TARGET_ARCH_aarch64
++# include "globalDefinitions_aarch64.hpp"
++#endif
+ 
+ 
+ // The byte alignment to be used by Arena::Amalloc.  See bugid 4169348.
+diff --git openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp
+index 003f2af..2aa7f87 100644
+--- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp
++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp
+@@ -261,6 +261,14 @@
+ #define NOT_ARM(code) code
+ #endif
+ 
++#ifdef AARCH64
++#define AARCH64_ONLY(code) code
++#define NOT_AARCH64(code)
++#else
++#define AARCH64_ONLY(code)
++#define NOT_AARCH64(code) code
++#endif
++
+ #ifdef JAVASE_EMBEDDED
+ #define EMBEDDED_ONLY(code) code
+ #define NOT_EMBEDDED(code)
-- 
2.26.2