hotspot/src/cpu/sparc/vm/register_definitions_sparc.cpp
author twisti
Fri, 13 Feb 2009 09:09:35 -0800
changeset 2031 24e034f56dcb
parent 670 ddf3e9583f2f
child 2534 08dac9ce0cd7
permissions -rw-r--r--
6800154: Add comments to long_by_long_mulhi() for better understandability Summary: This patch adds a comment pointing to the Hacker's Delight version of the algorithm plus a verbatim copy of it. Furthermore it adds inline comments. Reviewed-by: kvn, jrose
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
670
ddf3e9583f2f 6719955: Update copyright year
xdono
parents: 360
diff changeset
     2
 * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
// make sure the defines don't screw up the declarations later on in this file
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
#define DONT_USE_REGISTER_DEFINES
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
#include "incls/_precompiled.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
#include "incls/_register_definitions_sparc.cpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
REGISTER_DEFINITION(Register, noreg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
REGISTER_DEFINITION(Register, G0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
REGISTER_DEFINITION(Register, G1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
REGISTER_DEFINITION(Register, G2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
REGISTER_DEFINITION(Register, G3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
REGISTER_DEFINITION(Register, G4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
REGISTER_DEFINITION(Register, G5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
REGISTER_DEFINITION(Register, G6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
REGISTER_DEFINITION(Register, G7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
REGISTER_DEFINITION(Register, O0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
REGISTER_DEFINITION(Register, O1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
REGISTER_DEFINITION(Register, O2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
REGISTER_DEFINITION(Register, O3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
REGISTER_DEFINITION(Register, O4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
REGISTER_DEFINITION(Register, O5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
REGISTER_DEFINITION(Register, O6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
REGISTER_DEFINITION(Register, O7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
REGISTER_DEFINITION(Register, L0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
REGISTER_DEFINITION(Register, L1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
REGISTER_DEFINITION(Register, L2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
REGISTER_DEFINITION(Register, L3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
REGISTER_DEFINITION(Register, L4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
REGISTER_DEFINITION(Register, L5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
REGISTER_DEFINITION(Register, L6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
REGISTER_DEFINITION(Register, L7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
REGISTER_DEFINITION(Register, I0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
REGISTER_DEFINITION(Register, I1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
REGISTER_DEFINITION(Register, I2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
REGISTER_DEFINITION(Register, I3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
REGISTER_DEFINITION(Register, I4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
REGISTER_DEFINITION(Register, I5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
REGISTER_DEFINITION(Register, I6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
REGISTER_DEFINITION(Register, I7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
REGISTER_DEFINITION(Register, FP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
REGISTER_DEFINITION(Register, SP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
REGISTER_DEFINITION(FloatRegister, fnoreg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
REGISTER_DEFINITION(FloatRegister, F0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
REGISTER_DEFINITION(FloatRegister, F1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
REGISTER_DEFINITION(FloatRegister, F2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
REGISTER_DEFINITION(FloatRegister, F3);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
REGISTER_DEFINITION(FloatRegister, F4);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
REGISTER_DEFINITION(FloatRegister, F5);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
REGISTER_DEFINITION(FloatRegister, F6);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
REGISTER_DEFINITION(FloatRegister, F7);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
REGISTER_DEFINITION(FloatRegister, F8);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
REGISTER_DEFINITION(FloatRegister, F9);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
REGISTER_DEFINITION(FloatRegister, F10);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
REGISTER_DEFINITION(FloatRegister, F11);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
REGISTER_DEFINITION(FloatRegister, F12);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
REGISTER_DEFINITION(FloatRegister, F13);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
REGISTER_DEFINITION(FloatRegister, F14);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
REGISTER_DEFINITION(FloatRegister, F15);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
REGISTER_DEFINITION(FloatRegister, F16);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
REGISTER_DEFINITION(FloatRegister, F17);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
REGISTER_DEFINITION(FloatRegister, F18);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
REGISTER_DEFINITION(FloatRegister, F19);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
REGISTER_DEFINITION(FloatRegister, F20);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
REGISTER_DEFINITION(FloatRegister, F21);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
REGISTER_DEFINITION(FloatRegister, F22);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
REGISTER_DEFINITION(FloatRegister, F23);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
REGISTER_DEFINITION(FloatRegister, F24);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
REGISTER_DEFINITION(FloatRegister, F25);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
REGISTER_DEFINITION(FloatRegister, F26);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
REGISTER_DEFINITION(FloatRegister, F27);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
REGISTER_DEFINITION(FloatRegister, F28);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
REGISTER_DEFINITION(FloatRegister, F29);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
REGISTER_DEFINITION(FloatRegister, F30);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
REGISTER_DEFINITION(FloatRegister, F31);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
REGISTER_DEFINITION(FloatRegister, F32);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
REGISTER_DEFINITION(FloatRegister, F34);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
REGISTER_DEFINITION(FloatRegister, F36);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
REGISTER_DEFINITION(FloatRegister, F38);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
REGISTER_DEFINITION(FloatRegister, F40);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
REGISTER_DEFINITION(FloatRegister, F42);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
REGISTER_DEFINITION(FloatRegister, F44);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
REGISTER_DEFINITION(FloatRegister, F46);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
REGISTER_DEFINITION(FloatRegister, F48);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
REGISTER_DEFINITION(FloatRegister, F50);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
REGISTER_DEFINITION(FloatRegister, F52);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
REGISTER_DEFINITION(FloatRegister, F54);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
REGISTER_DEFINITION(FloatRegister, F56);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
REGISTER_DEFINITION(FloatRegister, F58);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
REGISTER_DEFINITION(FloatRegister, F60);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
REGISTER_DEFINITION(FloatRegister, F62);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
REGISTER_DEFINITION(     Register, Otos_i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
REGISTER_DEFINITION(     Register, Otos_l);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
REGISTER_DEFINITION(     Register, Otos_l1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
REGISTER_DEFINITION(     Register, Otos_l2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
REGISTER_DEFINITION(FloatRegister, Ftos_f);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
REGISTER_DEFINITION(FloatRegister, Ftos_d);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
REGISTER_DEFINITION(FloatRegister, Ftos_d1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
REGISTER_DEFINITION(FloatRegister, Ftos_d2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
REGISTER_DEFINITION(Register, G2_thread);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   134
REGISTER_DEFINITION(Register, G6_heapbase);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
REGISTER_DEFINITION(Register, G5_method);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
REGISTER_DEFINITION(Register, G5_megamorphic_method);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
REGISTER_DEFINITION(Register, G5_inline_cache_reg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
REGISTER_DEFINITION(Register, Gargs);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
REGISTER_DEFINITION(Register, L7_thread_cache);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
REGISTER_DEFINITION(Register, Gframe_size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
REGISTER_DEFINITION(Register, G1_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
REGISTER_DEFINITION(Register, G3_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
REGISTER_DEFINITION(Register, G4_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
REGISTER_DEFINITION(Register, Gtemp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
REGISTER_DEFINITION(Register, Lentry_args);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
#ifdef CC_INTERP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
REGISTER_DEFINITION(Register, Lstate);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
REGISTER_DEFINITION(Register, L1_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
REGISTER_DEFINITION(Register, Lmirror);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
REGISTER_DEFINITION(Register, L2_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
REGISTER_DEFINITION(Register, L3_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
REGISTER_DEFINITION(Register, L4_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
REGISTER_DEFINITION(Register, Lscratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
REGISTER_DEFINITION(Register, Lscratch2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
REGISTER_DEFINITION(Register, L7_scratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
REGISTER_DEFINITION(Register, I5_savedSP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
#else // CC_INTERP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
REGISTER_DEFINITION(Register, Lesp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
REGISTER_DEFINITION(Register, Lbcp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
REGISTER_DEFINITION(Register, Lmonitors);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
REGISTER_DEFINITION(Register, Lbyte_code);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
REGISTER_DEFINITION(Register, Llast_SP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
REGISTER_DEFINITION(Register, Lscratch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
REGISTER_DEFINITION(Register, Lscratch2);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
REGISTER_DEFINITION(Register, LcpoolCache);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
REGISTER_DEFINITION(Register, I5_savedSP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
REGISTER_DEFINITION(Register, O5_savedSP);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
REGISTER_DEFINITION(Register, IdispatchAddress);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
REGISTER_DEFINITION(Register, ImethodDataPtr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
REGISTER_DEFINITION(Register, IdispatchTables);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
#endif // CC_INTERP
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
REGISTER_DEFINITION(Register, Lmethod);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
REGISTER_DEFINITION(Register, Llocals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
REGISTER_DEFINITION(Register, Oexception);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
REGISTER_DEFINITION(Register, Oissuing_pc);