translate.py (5239:0920dfb94514) translate.py (5927:5e3367b103da)
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

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

50# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53#
54# Authors: Gabe Black
55
56microcode = '''
57def macroop XLAT {
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

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

50# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53#
54# Authors: Gabe Black
55
56microcode = '''
57def macroop XLAT {
58 zexti t1, rax, 7
58 zexti t1, rax, 7, dataSize=8
59 # Here, t1 can be used directly. The value of al is supposed to be treated
60 # as unsigned. Since we zero extended it from 8 bits above and the address
61 # size has to be at least 16 bits, t1 will not be sign extended.
62 ld rax, seg, [1, rbx, t1], dataSize=1
63};
64'''
59 # Here, t1 can be used directly. The value of al is supposed to be treated
60 # as unsigned. Since we zero extended it from 8 bits above and the address
61 # size has to be at least 16 bits, t1 will not be sign extended.
62 ld rax, seg, [1, rbx, t1], dataSize=1
63};
64'''