amd64.il revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/
/
/
/
/
.end
/
/
.end
/
/ return caller
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
.end
/
/
/* XX64 These don't work correctly with SOS9 build 13.0 yet
.inline clear_int_flag,0
pushfq
cli
popq %rax
.end
.inline intr_clear,0
pushfq
cli
popq %rax
.end
*/
/
/
/* XX64 These don't work correctly with SOS9 build 13.0 yet
.inline restore_int_flag,4
pushq %rdi
popfq
.end
.inline intr_restore,4
pushq %rdi
popfq
.end
*/
/
/
.end
.end
.end
.end
.end
.end
/
/
.end
.end
.end
.end
/*
* multiply two long numbers and yield a u_lonlong_t result
* Provided to manipulate hrtime_t values.
*/
/* XX64 These don't work correctly with SOS9 build 13.0 yet
.inline mul32, 8
xorl %edx, %edx
movl %edi, %eax
mull %esi
shlq $32, %rdx
orq %rdx, %rax
ret
.end
*/
/*
* Unlock hres_lock and increment the count value. (See clock.h)
*/
.end
.end
.end
/*
* void atomic_inc16(uint16_t *addr) { ++*addr; }
* void atomic_dec16(uint16_t *addr) { --*addr; }
*/
.end
.end
/*
* atomic bit clear
*/
.end
/*
* Read Time Stamp Counter
* uint64_t tsc_read();
*
* usage:
* uint64_t cycles = tsc_read();
*
* PPro & PII take no less than 34 cycles to execute rdtsc + stores.
* Pentium takes about 16 cycles.
*/
.end
/*
* Call the pause instruction. To the Pentium 4 Xeon processor, it acts as
* a hint that the code sequence is a busy spin-wait loop. Without a pause
* instruction in these loops, the P4 Xeon processor may suffer a severe
* penalty when exiting the loop because the processor detects a possible
* memory violation. Inserting the pause instruction significantly reduces
* the likelihood of a memory order violation, improving performance.
* The pause instruction is a NOP on all other IA-32 processors.
*/
.end
/*
* Call the halt instruction. This will put the CPU to sleep until
* it is again awoken via an interrupt.
* This function should be called with interrupts already disabled
* for the CPU.
* Note that "sti" will only enable interrupts at the end of the
* subsequent instruction...in this case: "hlt".
*/
.end