1 /*
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
161 HasNegativesNode(Node* control, Node* char_array_mem, Node* s1, Node* c1):
162 StrIntrinsicNode(control, char_array_mem, s1, c1, none) {};
163 virtual int Opcode() const;
164 virtual const Type* bottom_type() const { return TypeInt::BOOL; }
165 };
166
167
168 //------------------------------EncodeISOArray--------------------------------
169 // encode char[] to byte[] in ISO_8859_1
170 class EncodeISOArrayNode: public Node {
171 public:
172 EncodeISOArrayNode(Node* control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
173 virtual int Opcode() const;
174 virtual bool depends_only_on_test() const { return false; }
175 virtual const Type* bottom_type() const { return TypeInt::INT; }
176 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
177 virtual uint match_edge(uint idx) const;
178 virtual uint ideal_reg() const { return Op_RegI; }
179 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
180 virtual const Type* Value(PhaseGVN* phase) const;
181 };
182
183 #endif // SHARE_VM_OPTO_INTRINSICNODE_HPP
|
1 /*
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
161 HasNegativesNode(Node* control, Node* char_array_mem, Node* s1, Node* c1):
162 StrIntrinsicNode(control, char_array_mem, s1, c1, none) {};
163 virtual int Opcode() const;
164 virtual const Type* bottom_type() const { return TypeInt::BOOL; }
165 };
166
167
168 //------------------------------EncodeISOArray--------------------------------
169 // encode char[] to byte[] in ISO_8859_1
170 class EncodeISOArrayNode: public Node {
171 public:
172 EncodeISOArrayNode(Node* control, Node* arymem, Node* s1, Node* s2, Node* c): Node(control, arymem, s1, s2, c) {};
173 virtual int Opcode() const;
174 virtual bool depends_only_on_test() const { return false; }
175 virtual const Type* bottom_type() const { return TypeInt::INT; }
176 virtual const TypePtr* adr_type() const { return TypePtr::BOTTOM; }
177 virtual uint match_edge(uint idx) const;
178 virtual uint ideal_reg() const { return Op_RegI; }
179 virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
180 virtual const Type* Value(PhaseGVN* phase) const;
181 };
182
183 //-------------------------------DigitNode----------------------------------------
184 class DigitNode : public Node {
185 public:
186 DigitNode(Node* control, Node *in1) : Node(control, in1) {}
187 virtual int Opcode() const;
188 const Type* bottom_type() const { return TypeInt::BOOL; }
189 virtual uint ideal_reg() const { return Op_RegI; }
190 };
191
192 //------------------------------LowerCaseNode------------------------------------
193 class LowerCaseNode : public Node {
194 public:
195 LowerCaseNode(Node* control, Node *in1) : Node(control, in1) {}
196 virtual int Opcode() const;
197 const Type* bottom_type() const { return TypeInt::BOOL; }
198 virtual uint ideal_reg() const { return Op_RegI; }
199 };
200
201 //------------------------------UpperCaseNode------------------------------------
202 class UpperCaseNode : public Node {
203 public:
204 UpperCaseNode(Node* control, Node *in1) : Node(control, in1) {}
205 virtual int Opcode() const;
206 const Type* bottom_type() const { return TypeInt::BOOL; }
207 virtual uint ideal_reg() const { return Op_RegI; }
208 };
209
210 //------------------------------WhitespaceCode-----------------------------------
211 class WhitespaceNode : public Node {
212 public:
213 WhitespaceNode(Node* control, Node *in1) : Node(control, in1) {}
214 virtual int Opcode() const;
215 const Type* bottom_type() const { return TypeInt::BOOL; }
216 virtual uint ideal_reg() const { return Op_RegI; }
217 };
218
219 #endif // SHARE_VM_OPTO_INTRINSICNODE_HPP
|