semaphores.py (11329:82bb3ee706b3) semaphores.py (12390:464513ab8668)
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# Copyright (c) 2015 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# The license below extends only to copyright in the software and shall
6# not be construed as granting a license to any other intellectual
7# property including but not limited to intellectual property relating
8# to a hardware implementation of the functionality of the software

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

127
128'''
129
130# Despite the name, this microcode sequence implements both
131# cmpxchg8b and cmpxchg16b, depending on the dynamic value
132# of dataSize.
133cmpxchg8bCode = '''
134def macroop CMPXCHG8B_%(suffix)s {
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# Copyright (c) 2015 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# The license below extends only to copyright in the software and shall
6# not be construed as granting a license to any other intellectual
7# property including but not limited to intellectual property relating
8# to a hardware implementation of the functionality of the software

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

127
128'''
129
130# Despite the name, this microcode sequence implements both
131# cmpxchg8b and cmpxchg16b, depending on the dynamic value
132# of dataSize.
133cmpxchg8bCode = '''
134def macroop CMPXCHG8B_%(suffix)s {
135 .adjust_env clampOsz
135 %(rdip)s
136 lea t1, seg, %(sib)s, disp, dataSize=asz
137 ldsplit%(l)s (t2, t3), seg, [1, t0, t1], disp=0
138
139 sub t0, rax, t2, flags=(ZF,)
140 br label("doneComparing"), flags=(nCZF,)
141 sub t0, rdx, t3, flags=(ZF,)
142doneComparing:

--- 31 unchanged lines hidden ---
136 %(rdip)s
137 lea t1, seg, %(sib)s, disp, dataSize=asz
138 ldsplit%(l)s (t2, t3), seg, [1, t0, t1], disp=0
139
140 sub t0, rax, t2, flags=(ZF,)
141 br label("doneComparing"), flags=(nCZF,)
142 sub t0, rdx, t3, flags=(ZF,)
143doneComparing:

--- 31 unchanged lines hidden ---