shift.py (5961:969fb3187eba) | shift.py (5977:4fff54ab52ae) |
---|---|
1# Copyright (c) 2007 The Hewlett-Packard Development Company 2# All rights reserved. 3# 4# Redistribution and use of this software in source and binary forms, 5# with or without modification, are permitted provided that the 6# following conditions are met: 7# 8# The software must be used only for Non-Commercial Use which means any --- 160 unchanged lines hidden (view full) --- 169def macroop SHR_P_R 170{ 171 rdip t7 172 ldst t1, seg, riprel, disp 173 srl t1, t1, reg, flags=(CF,OF,SF,ZF,PF) 174 st t1, seg, riprel, disp 175}; 176 | 1# Copyright (c) 2007 The Hewlett-Packard Development Company 2# All rights reserved. 3# 4# Redistribution and use of this software in source and binary forms, 5# with or without modification, are permitted provided that the 6# following conditions are met: 7# 8# The software must be used only for Non-Commercial Use which means any --- 160 unchanged lines hidden (view full) --- 169def macroop SHR_P_R 170{ 171 rdip t7 172 ldst t1, seg, riprel, disp 173 srl t1, t1, reg, flags=(CF,OF,SF,ZF,PF) 174 st t1, seg, riprel, disp 175}; 176 |
177# SHRD will not set OF correctly when the shift count is 1. 178def macroop SHRD_R_R_I 179{ 180 srli t1, reg, imm, flags=(CF,) 181 rori t2, regm, imm 182 srli t3, regm, imm 183 xor t2, t2, t3 184 or reg, t1, t2 185}; 186 187# SHRD will not set OF correctly when the shift count is 1. 188def macroop SHRD_M_R_I 189{ 190 ldst t1, seg, sib, disp 191 srli t1, t1, imm, flags=(CF,) 192 rori t2, reg, imm 193 srli t3, reg, imm 194 xor t2, t2, t3 195 or t1, t1, t2 196 st t1, seg, sib, disp 197}; 198 199# SHRD will not set OF correctly when the shift count is 1. 200def macroop SHRD_P_R_I 201{ 202 rdip t7 203 ldst t1, seg, riprel, disp 204 srli t1, t1, imm, flags=(CF,) 205 rori t2, reg, imm 206 srli t3, reg, imm 207 xor t2, t2, t3 208 or t1, t1, t2 209 st t1, seg, riprel, disp 210}; 211 |
|
177def macroop SAR_R_I 178{ 179 srai reg, reg, imm, flags=(CF,OF,SF,ZF,PF) 180}; 181 182def macroop SAR_M_I 183{ 184 ldst t1, seg, sib, disp --- 52 unchanged lines hidden --- | 212def macroop SAR_R_I 213{ 214 srai reg, reg, imm, flags=(CF,OF,SF,ZF,PF) 215}; 216 217def macroop SAR_M_I 218{ 219 ldst t1, seg, sib, disp --- 52 unchanged lines hidden --- |