]> git.saurik.com Git - apple/javascriptcore.git/blame - offlineasm/registers.rb
JavaScriptCore-7600.1.4.11.8.tar.gz
[apple/javascriptcore.git] / offlineasm / registers.rb
CommitLineData
6fe7ccc8
A
1# Copyright (C) 2011 Apple Inc. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions
5# are met:
6# 1. Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# 2. Redistributions in binary form must reproduce the above copyright
9# notice, this list of conditions and the following disclaimer in the
10# documentation and/or other materials provided with the distribution.
11#
12# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
13# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
16# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22# THE POSSIBILITY OF SUCH DAMAGE.
23
93a37866
A
24require "config"
25
6fe7ccc8
A
26GPRS =
27 [
28 "t0",
29 "t1",
30 "t2",
31 "t3",
32 "t4",
81345200
A
33 "t5",
34 "t6",
35 "t7",
36 "t8",
37 "t9",
6fe7ccc8
A
38 "cfr",
39 "a0",
40 "a1",
81345200
A
41 "a2",
42 "a3",
6fe7ccc8
A
43 "r0",
44 "r1",
45 "sp",
46 "lr",
81345200 47 "pc",
6fe7ccc8 48 # 64-bit only registers:
81345200
A
49 "csr1", # tag type number register
50 "csr2" # tag mask register
6fe7ccc8
A
51 ]
52
53FPRS =
54 [
55 "ft0",
56 "ft1",
57 "ft2",
58 "ft3",
59 "ft4",
60 "ft5",
61 "fa0",
62 "fa1",
63 "fa2",
64 "fa3",
65 "fr"
66 ]
67
68REGISTERS = GPRS + FPRS
69
70GPR_PATTERN = Regexp.new('\\A((' + GPRS.join(')|(') + '))\\Z')
71FPR_PATTERN = Regexp.new('\\A((' + FPRS.join(')|(') + '))\\Z')
72
73REGISTER_PATTERN = Regexp.new('\\A((' + REGISTERS.join(')|(') + '))\\Z')