control_registers.py (5933:8b9bc09b149c) | control_registers.py (6054:0aa0a6189767) |
---|---|
1# Copyright (c) 2009 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 18 unchanged lines hidden (view full) --- 27# Authors: Gabe Black 28 29microcode = ''' 30def macroop CLTS { 31 rdcr t1, 0, dataSize=8 32 andi t1, t1, 0xF7, dataSize=1 33 wrcr 0, t1, dataSize=8 34}; | 1# Copyright (c) 2009 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 18 unchanged lines hidden (view full) --- 27# Authors: Gabe Black 28 29microcode = ''' 30def macroop CLTS { 31 rdcr t1, 0, dataSize=8 32 andi t1, t1, 0xF7, dataSize=1 33 wrcr 0, t1, dataSize=8 34}; |
35 36def macroop LMSW_R { 37 rdcr t1, 0, dataSize=8 38 # This logic sets MP, EM, and TS to whatever is in the operand. It will 39 # set PE but not clear it. 40 limm t2, "~ULL(0xe)", dataSize=8 41 and t1, t1, t2, dataSize=8 42 andi t2, reg, 0xf, dataSize=8 43 or t1, t1, t2, dataSize=8 44 wrcr 0, t1, dataSize=8 45}; 46 47def macroop LMSW_M { 48 ld t3, seg, sib, disp, dataSize=2 49 rdcr t1, 0, dataSize=8 50 # This logic sets MP, EM, and TS to whatever is in the operand. It will 51 # set PE but not clear it. 52 limm t2, "~ULL(0xe)", dataSize=8 53 and t1, t1, t2, dataSize=8 54 andi t2, t3, 0xf, dataSize=8 55 or t1, t1, t2, dataSize=8 56 wrcr 0, t1, dataSize=8 57}; 58 59def macroop LMSW_P { 60 rdip t7, dataSize=asz 61 ld t3, seg, riprel, disp, dataSize=2 62 rdcr t1, 0, dataSize=8 63 # This logic sets MP, EM, and TS to whatever is in the operand. It will 64 # set PE but not clear it. 65 limm t2, "~ULL(0xe)", dataSize=8 66 and t1, t1, t2, dataSize=8 67 andi t2, t3, 0xf, dataSize=8 68 or t1, t1, t2, dataSize=8 69 wrcr 0, t1, dataSize=8 70}; |
|
35''' | 71''' |