Deleted Added
sdiff udiff text old ( 2965:82703e01285a ) new ( 3954:d689b611d9dc )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2006 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

--- 140 unchanged lines hidden (view full) ---

149 0x1: mthi({{ HI = Rs; }});
150 0x2: mflo({{ Rd = LO; }});
151 0x3: mtlo({{ LO = Rs; }});
152 }
153 }
154
155 0x3: decode FUNCTION_LO {
156 format HiLoOp {
157 0x0: mult({{ val = Rs.sd * Rt.sd; }});
158 0x1: multu({{ val = Rs.ud * Rt.ud; }});
159 }
160
161 format HiLoMiscOp {
162 0x2: div({{ if (Rt.sd != 0) {
163 HI = Rs.sd % Rt.sd;
164 LO = Rs.sd / Rt.sd;
165 }
166 }});
167 0x3: divu({{ if (Rt.ud != 0) {
168 HI = Rs.ud % Rt.ud;
169 LO = Rs.ud / Rt.ud;
170 }
171 }});
172 }
173 }
174
175 0x4: decode HINT {
176 0x0: decode FUNCTION_LO {
177 format IntOp {

--- 767 unchanged lines hidden (view full) ---

945 //Table A-5 MIPS32 SPECIAL2 Encoding of Function Field
946 0x4: decode FUNCTION_HI {
947 0x0: decode FUNCTION_LO {
948 0x2: IntOp::mul({{ int64_t temp1 = Rs.sd * Rt.sd;
949 Rd.sw = temp1<31:0>
950 }});
951
952 format HiLoOp {
953 0x0: madd({{ val = ((int64_t) HI << 32 | LO) +
954 (Rs.sd * Rt.sd);
955 }});
956 0x1: maddu({{ val = ((uint64_t) HI << 32 | LO) +
957 (Rs.ud * Rt.ud);
958 }});
959 0x4: msub({{ val = ((int64_t) HI << 32 | LO) -
960 (Rs.sd * Rt.sd);
961 }});
962 0x5: msubu({{ val = ((uint64_t) HI << 32 | LO) -
963 (Rs.ud * Rt.ud);
964 }});
965 }
966 }
967
968 0x4: decode FUNCTION_LO {
969 format BasicOp {
970 0x0: clz({{ int cnt = 32;
971 for (int idx = 31; idx >= 0; idx--) {

--- 131 unchanged lines hidden ---