001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
005 *  You may not use this file except in compliance with the License. You
006 *  may obtain a copy of the License at
007 *
008 *      http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package org.jikesrvm.compilers.opt.ir.ia32;
014
015import org.vmmagic.pragma.Pure;
016import org.jikesrvm.compilers.opt.ir.Operator;
017
018/**
019 * Class to store the string representations of different operators.<p>
020 * 
021 * THIS FILE IS MACHINE_GENERATED. DO NOT EDIT.
022 * See ArchOperatorNames.template, OperatorList.dat, etc
023 */
024public abstract class ArchOperatorNames {
025
026  /** Lookup for operator names based on their opcode */
027  private static final String[] operatorName = new String[] {
028      "get_caught_exception    ",
029      "set_caught_exception    ",
030      "new                     ",
031      "new_unresolved          ",
032      "newarray                ",
033      "newarray_unresolved     ",
034      "athrow                  ",
035      "checkcast               ",
036      "checkcast_notnull       ",
037      "checkcast_unresolved    ",
038      "must_implement_interface ",
039      "instanceof              ",
040      "instanceof_notnull      ",
041      "instanceof_unresolved   ",
042      "monitorenter            ",
043      "monitorexit             ",
044      "newobjmultiarray        ",
045      "getstatic               ",
046      "putstatic               ",
047      "getfield                ",
048      "putfield                ",
049      "int_zero_check          ",
050      "long_zero_check         ",
051      "bounds_check            ",
052      "objarray_store_check    ",
053      "objarray_store_check_notnull ",
054      "ig_patch_point          ",
055      "ig_class_test           ",
056      "ig_method_test          ",
057      "tableswitch             ",
058      "lookupswitch            ",
059      "int_aload               ",
060      "long_aload              ",
061      "float_aload             ",
062      "double_aload            ",
063      "ref_aload               ",
064      "ubyte_aload             ",
065      "byte_aload              ",
066      "ushort_aload            ",
067      "short_aload             ",
068      "int_astore              ",
069      "long_astore             ",
070      "float_astore            ",
071      "double_astore           ",
072      "ref_astore              ",
073      "byte_astore             ",
074      "short_astore            ",
075      "int_ifcmp               ",
076      "int_ifcmp2              ",
077      "long_ifcmp              ",
078      "float_ifcmp             ",
079      "double_ifcmp            ",
080      "ref_ifcmp               ",
081      "label                   ",
082      "bbend                   ",
083      "unint_begin             ",
084      "unint_end               ",
085      "fence                   ",
086      "read_ceiling            ",
087      "write_floor             ",
088      "phi                     ",
089      "split                   ",
090      "pi                      ",
091      "nop                     ",
092      "int_move                ",
093      "long_move               ",
094      "float_move              ",
095      "double_move             ",
096      "ref_move                ",
097      "guard_move              ",
098      "int_cond_move           ",
099      "long_cond_move          ",
100      "float_cond_move         ",
101      "double_cond_move        ",
102      "ref_cond_move           ",
103      "guard_cond_move         ",
104      "guard_combine           ",
105      "ref_add                 ",
106      "int_add                 ",
107      "long_add                ",
108      "float_add               ",
109      "double_add              ",
110      "ref_sub                 ",
111      "int_sub                 ",
112      "long_sub                ",
113      "float_sub               ",
114      "double_sub              ",
115      "int_mul                 ",
116      "long_mul                ",
117      "float_mul               ",
118      "double_mul              ",
119      "int_div                 ",
120      "long_div                ",
121      "float_div               ",
122      "double_div              ",
123      "int_rem                 ",
124      "long_rem                ",
125      "float_rem               ",
126      "double_rem              ",
127      "ref_neg                 ",
128      "int_neg                 ",
129      "long_neg                ",
130      "float_neg               ",
131      "double_neg              ",
132      "float_sqrt              ",
133      "double_sqrt             ",
134      "ref_shl                 ",
135      "int_shl                 ",
136      "long_shl                ",
137      "ref_shr                 ",
138      "int_shr                 ",
139      "long_shr                ",
140      "ref_ushr                ",
141      "int_ushr                ",
142      "long_ushr               ",
143      "ref_and                 ",
144      "int_and                 ",
145      "long_and                ",
146      "ref_or                  ",
147      "int_or                  ",
148      "long_or                 ",
149      "ref_xor                 ",
150      "int_xor                 ",
151      "ref_not                 ",
152      "int_not                 ",
153      "long_not                ",
154      "long_xor                ",
155      "int_2addrsigext         ",
156      "int_2addrze.ext         ",
157      "long_2addr              ",
158      "addr_2int               ",
159      "addr_2long              ",
160      "int_2long               ",
161      "int_2float              ",
162      "int_2double             ",
163      "long_2int               ",
164      "long_2float             ",
165      "long_2double            ",
166      "float_2int              ",
167      "float_2long             ",
168      "float_2double           ",
169      "double_2int             ",
170      "double_2long            ",
171      "double_2float           ",
172      "int_2byte               ",
173      "int_2ushort             ",
174      "int_2short              ",
175      "long_cmp                ",
176      "float_cmpl              ",
177      "float_cmpg              ",
178      "double_cmpl             ",
179      "double_cmpg             ",
180      "return                  ",
181      "null_check              ",
182      "goto                    ",
183      "boolean_not             ",
184      "boolean_cmp_int         ",
185      "boolean_cmp_addr        ",
186      "boolean_cmp_long        ",
187      "boolean_cmp_float       ",
188      "boolean_cmp_double      ",
189      "byte_load               ",
190      "ubyte_load              ",
191      "short_load              ",
192      "ushort_load             ",
193      "ref_load                ",
194      "ref_store               ",
195      "int_load                ",
196      "long_load               ",
197      "float_load              ",
198      "double_load             ",
199      "byte_store              ",
200      "short_store             ",
201      "int_store               ",
202      "long_store              ",
203      "float_store             ",
204      "double_store            ",
205      "prepare_int             ",
206      "prepare_addr            ",
207      "prepare_long            ",
208      "attempt_int             ",
209      "attempt_addr            ",
210      "attempt_long            ",
211      "call                    ",
212      "syscall                 ",
213      "yieldpoint_prologue     ",
214      "yieldpoint_epilogue     ",
215      "yieldpoint_backedge     ",
216      "yieldpoint_osr          ",
217      "osr_barrier             ",
218      "ir_prologue             ",
219      "resolve                 ",
220      "resolve_member          ",
221      "get_time_base           ",
222      "instrumented_event_counter ",
223      "trap_if                 ",
224      "trap                    ",
225      "float_as_int_bits       ",
226      "int_bits_as_float       ",
227      "double_as_long_bits     ",
228      "long_bits_as_double     ",
229      "arraylength             ",
230      "get_obj_tib             ",
231      "get_class_tib           ",
232      "get_type_from_tib       ",
233      "get_superclass_ids_from_tib ",
234      "get_does_implement_from_tib ",
235      "get_array_element_tib_from_tib ",
236      "lowtableswitch          ",
237      "address_constant        ",
238      "int_constant            ",
239      "long_constant           ",
240      "register                ",
241      "other_operand           ",
242      "null                    ",
243      "branch_target           ",
244  //////////////////////////
245  // END   Architecture Independent opcodes.
246  // BEGIN Architecture Dependent opcodes & MIR.
247  //////////////////////////
248      "materialize_fp_constant ",
249      "round_to_zero           ",
250      "clear_floating_point_state ",
251      "prefetch                ",
252      "pause                   ",
253      "fp_add                  ",
254      "fp_sub                  ",
255      "fp_mul                  ",
256      "fp_div                  ",
257      "fp_neg                  ",
258      "fp_rem                  ",
259      "int_2fp                 ",
260      "long_2fp                ",
261      "cmp_cmov                ",
262      "fcmp_cmov               ",
263      "lcmp_cmov               ",
264      "cmp_fcmov               ",
265      "fcmp_fcmov              ",
266      "call_save_volatile      ",
267      "mir_start               ",
268      "require_esp             ",
269      "advise_esp              ",
270      "mir_lowtableswitch      ",
271      "ia32_methodstart        ",
272      "ia32_fclear             ",
273      "dummy_def               ",
274      "dummy_use               ",
275      "immq_mov                ",
276      "ia32_fmov_ending_live_range ",
277      "ia32_fmov               ",
278      "ia32_trapif             ",
279      "ia32_offset             ",
280      "ia32_lock_cmpxchg       ",
281      "ia32_lock_cmpxchg8b     ",
282      "ia32_adc                ",
283      "ia32_add                ",
284      "ia32_and                ",
285      "ia32_bswap              ",
286      "ia32_bt                 ",
287      "ia32_btc                ",
288      "ia32_btr                ",
289      "ia32_bts                ",
290      "ia32_syscall            ",
291      "ia32_call               ",
292      "ia32_cdq                ",
293      "ia32_cdo                ",
294      "ia32_cdqe               ",
295      "ia32_cmov               ",
296      "ia32_cmp                ",
297      "ia32_cmpxchg            ",
298      "ia32_cmpxchg8b          ",
299      "ia32_dec                ",
300      "ia32_div                ",
301      "ia32_fadd               ",
302      "ia32_faddp              ",
303      "ia32_fchs               ",
304      "ia32_fcmov              ",
305      "ia32_fcomi              ",
306      "ia32_fcomip             ",
307      "ia32_fdiv               ",
308      "ia32_fdivp              ",
309      "ia32_fdivr              ",
310      "ia32_fdivrp             ",
311      "ia32_fexam              ",
312      "ia32_fxch               ",
313      "ia32_ffree              ",
314      "ia32_ffreep             ",
315      "ia32_fiadd              ",
316      "ia32_fidiv              ",
317      "ia32_fidivr             ",
318      "ia32_fild               ",
319      "ia32_fimul              ",
320      "ia32_finit              ",
321      "ia32_fist               ",
322      "ia32_fistp              ",
323      "ia32_fisub              ",
324      "ia32_fisubr             ",
325      "ia32_fld                ",
326      "ia32_fldcw              ",
327      "ia32_fld1               ",
328      "ia32_fldl2t             ",
329      "ia32_fldl2e             ",
330      "ia32_fldpi              ",
331      "ia32_fldlg2             ",
332      "ia32_fldln2             ",
333      "ia32_fldz               ",
334      "ia32_fmul               ",
335      "ia32_fmulp              ",
336      "ia32_fnstcw             ",
337      "ia32_fnstsw             ",
338      "ia32_fninit             ",
339      "ia32_fnsave             ",
340      "ia32_fprem              ",
341      "ia32_frstor             ",
342      "ia32_fst                ",
343      "ia32_fstcw              ",
344      "ia32_fstsw              ",
345      "ia32_fstp               ",
346      "ia32_fsub               ",
347      "ia32_fsubp              ",
348      "ia32_fsubr              ",
349      "ia32_fsubrp             ",
350      "ia32_fucomi             ",
351      "ia32_fucomip            ",
352      "ia32_idiv               ",
353      "ia32_imul1              ",
354      "ia32_imul2              ",
355      "ia32_inc                ",
356      "ia32_int                ",
357      "ia32_jcc                ",
358      "ia32_jcc2               ",
359      "ia32_jmp                ",
360      "ia32_lea                ",
361      "ia32_lock               ",
362      "ia32_mov                ",
363      "ia32_movzx__b           ",
364      "ia32_movsx__b           ",
365      "ia32_movzx__w           ",
366      "ia32_movsx__w           ",
367      "ia32_movzxq__b          ",
368      "ia32_movsxq__b          ",
369      "ia32_movzxq__w          ",
370      "ia32_movsxq__w          ",
371      "ia32_movsxdq            ",
372      "ia32_mul                ",
373      "ia32_neg                ",
374      "ia32_not                ",
375      "ia32_or                 ",
376      "ia32_mfence             ",
377      "ia32_pause              ",
378      "ia32_prefetchnta        ",
379      "ia32_pop                ",
380      "ia32_push               ",
381      "ia32_rcl                ",
382      "ia32_rcr                ",
383      "ia32_rol                ",
384      "ia32_ror                ",
385      "ia32_ret                ",
386      "ia32_sal                ",
387      "ia32_sar                ",
388      "ia32_shl                ",
389      "ia32_shr                ",
390      "ia32_sbb                ",
391      "ia32_set__b             ",
392      "ia32_shld               ",
393      "ia32_shrd               ",
394      "ia32_sub                ",
395      "ia32_test               ",
396      "ia32_xor                ",
397      "ia32_rdtsc              ",
398      "ia32_addss              ",
399      "ia32_subss              ",
400      "ia32_mulss              ",
401      "ia32_divss              ",
402      "ia32_addsd              ",
403      "ia32_subsd              ",
404      "ia32_mulsd              ",
405      "ia32_divsd              ",
406      "ia32_andps              ",
407      "ia32_andpd              ",
408      "ia32_andnps             ",
409      "ia32_andnpd             ",
410      "ia32_orps               ",
411      "ia32_orpd               ",
412      "ia32_xorps              ",
413      "ia32_xorpd              ",
414      "ia32_ucomiss            ",
415      "ia32_ucomisd            ",
416      "ia32_cmpeqss            ",
417      "ia32_cmpltss            ",
418      "ia32_cmpless            ",
419      "ia32_cmpunordss         ",
420      "ia32_cmpness            ",
421      "ia32_cmpnltss           ",
422      "ia32_cmpnless           ",
423      "ia32_cmpordss           ",
424      "ia32_cmpeqsd            ",
425      "ia32_cmpltsd            ",
426      "ia32_cmplesd            ",
427      "ia32_cmpunordsd         ",
428      "ia32_cmpnesd            ",
429      "ia32_cmpnltsd           ",
430      "ia32_cmpnlesd           ",
431      "ia32_cmpordsd           ",
432      "ia32_movapd             ",
433      "ia32_movaps             ",
434      "ia32_movlpd             ",
435      "ia32_movlps             ",
436      "ia32_movss              ",
437      "ia32_movsd              ",
438      "ia32_movd               ",
439      "ia32_movq               ",
440      "ia32_psllq              ",
441      "ia32_psrlq              ",
442      "ia32_sqrtss             ",
443      "ia32_sqrtsd             ",
444      "ia32_cvtsi2ss           ",
445      "ia32_cvtss2sd           ",
446      "ia32_cvtss2si           ",
447      "ia32_cvttss2si          ",
448      "ia32_cvtsi2sd           ",
449      "ia32_cvtsd2ss           ",
450      "ia32_cvtsd2si           ",
451      "ia32_cvttsd2si          ",
452      "ia32_cvtsi2sdq          ",
453      "ia32_cvtsd2siq          ",
454      "ia32_cvttsd2siq         ",
455      "mir_end                 ",
456      "<UNKNOWN OPERATOR>"
457    };
458
459  /**
460   * Looks up name of operator
461   * @param operator the operator to look up
462   * @return operator's name or a string indicating
463   *  that the operator isn't known
464   */
465  @Pure
466  public static String toString(Operator operator) {
467     try {
468       return operatorName[operator.getOpcode()];
469     }
470     catch (ArrayIndexOutOfBoundsException e) {
471       return operatorName[operatorName.length-1];
472     }
473  }
474}