VirtualBox

source: vbox/trunk/include/iprt/asm-amd64-x86-watcom-32.h

Last change on this file was 98103, checked in by vboxsync, 17 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.0 KB
RevLine 
[58699]1/** @file
[58701]2 * IPRT - AMD64 and x86 Specific Assembly Functions, 32-bit Watcom C pragma aux.
[58699]3 */
4
5/*
[98103]6 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
[58699]7 *
[96407]8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
[58699]10 *
[96407]11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
[58699]24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
[96407]26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
[58699]28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
[96407]32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
[58699]34 */
35
[76557]36#ifndef IPRT_INCLUDED_asm_amd64_x86_watcom_32_h
37#define IPRT_INCLUDED_asm_amd64_x86_watcom_32_h
[76512]38/* no pragma once */
[76505]39
[76557]40#ifndef IPRT_INCLUDED_asm_amd64_x86_h
[58699]41# error "Don't include this header directly."
42#endif
43
[58701]44#ifndef __FLAT__
45# error "Only works with flat pointers! (-mf)"
[58699]46#endif
47
[58749]48/*
49 * Note! The #undef that preceds the #pragma aux statements is for undoing
50 * the mangling, because the symbol in #pragma aux [symbol] statements
51 * doesn't get subjected to preprocessing. This is also why we include
[75131]52 * the watcom header at both the top and the bottom of asm-amd64-x86.h file.
[58749]53 */
[58699]54
[58749]55#undef ASMGetIDTR
[75131]56#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]57#pragma aux ASMGetIDTR = \
[58701]58 "sidt fword ptr [ecx]" \
59 parm [ecx] \
[58699]60 modify exact [];
[75131]61#endif
[58699]62
[58749]63#undef ASMGetIdtrLimit
[75131]64#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]65#pragma aux ASMGetIdtrLimit = \
[58701]66 "sub esp, 8" \
67 "sidt fword ptr [esp]" \
68 "mov cx, [esp]" \
69 "add esp, 8" \
[58699]70 parm [] \
[58701]71 value [cx] \
72 modify exact [ecx];
[75131]73#endif
[58699]74
[58749]75#undef ASMSetIDTR
[75131]76#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]77#pragma aux ASMSetIDTR = \
[58701]78 "lidt fword ptr [ecx]" \
79 parm [ecx] nomemory \
[58699]80 modify nomemory;
[75131]81#endif
[58699]82
[58749]83#undef ASMGetGDTR
[75131]84#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]85#pragma aux ASMGetGDTR = \
[58701]86 "sgdt fword ptr [ecx]" \
87 parm [ecx] \
[58699]88 modify exact [];
[75131]89#endif
[58699]90
[58749]91#undef ASMSetGDTR
[75131]92#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]93#pragma aux ASMSetGDTR = \
[58701]94 "lgdt fword ptr [ecx]" \
95 parm [ecx] nomemory \
[58699]96 modify exact [] nomemory;
[75131]97#endif
[58699]98
[58749]99#undef ASMGetCS
[75131]100#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]101#pragma aux ASMGetCS = \
102 "mov ax, cs" \
103 parm [] nomemory \
104 value [ax] \
[58701]105 modify exact [eax] nomemory;
[75131]106#endif
[58699]107
[58749]108#undef ASMGetDS
[75131]109#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]110#pragma aux ASMGetDS = \
111 "mov ax, ds" \
112 parm [] nomemory \
113 value [ax] \
[58701]114 modify exact [eax] nomemory;
[75131]115#endif
[58699]116
[58749]117#undef ASMGetES
[75131]118#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]119#pragma aux ASMGetES = \
120 "mov ax, es" \
121 parm [] nomemory \
122 value [ax] \
[58701]123 modify exact [eax] nomemory;
[75131]124#endif
[58699]125
[58749]126#undef ASMGetFS
[75131]127#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]128#pragma aux ASMGetFS = \
129 "mov ax, fs" \
130 parm [] nomemory \
131 value [ax] \
[58701]132 modify exact [eax] nomemory;
[75131]133#endif
[58699]134
[58749]135#undef ASMGetGS
[75131]136#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]137#pragma aux ASMGetGS = \
138 "mov ax, gs" \
139 parm [] nomemory \
140 value [ax] \
[58701]141 modify exact [eax] nomemory;
[75131]142#endif
[58699]143
[58749]144#undef ASMGetSS
[75131]145#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]146#pragma aux ASMGetSS = \
147 "mov ax, ss" \
148 parm [] nomemory \
149 value [ax] \
[58701]150 modify exact [eax] nomemory;
[75131]151#endif
[58699]152
[58749]153#undef ASMGetTR
[75131]154#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]155#pragma aux ASMGetTR = \
156 "str ax" \
157 parm [] nomemory \
158 value [ax] \
[58701]159 modify exact [eax] nomemory;
[75131]160#endif
[58699]161
[58749]162#undef ASMGetLDTR
[75131]163#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]164#pragma aux ASMGetLDTR = \
165 "sldt ax" \
166 parm [] nomemory \
167 value [ax] \
[58701]168 modify exact [eax] nomemory;
[75131]169#endif
[58699]170
171/** @todo ASMGetSegAttr */
172
[58749]173#undef ASMGetFlags
[75131]174#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]175#pragma aux ASMGetFlags = \
[58701]176 "pushfd" \
177 "pop eax" \
[58699]178 parm [] nomemory \
[58701]179 value [eax] \
180 modify exact [eax] nomemory;
[75131]181#endif
[58699]182
[58749]183#undef ASMSetFlags
[75131]184#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]185#pragma aux ASMSetFlags = \
[58701]186 "push eax" \
187 "popfd" \
188 parm [eax] nomemory \
[58699]189 modify exact [] nomemory;
[75131]190#endif
[58699]191
[58749]192#undef ASMChangeFlags
[75131]193#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]194#pragma aux ASMChangeFlags = \
[58701]195 "pushfd" \
196 "pop eax" \
197 "and edx, eax" \
198 "or edx, ecx" \
199 "push edx" \
200 "popfd" \
201 parm [edx] [ecx] nomemory \
202 value [eax] \
203 modify exact [edx] nomemory;
[75131]204#endif
[58699]205
[58749]206#undef ASMAddFlags
[75131]207#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]208#pragma aux ASMAddFlags = \
[58701]209 "pushfd" \
210 "pop eax" \
211 "or edx, eax" \
212 "push edx" \
213 "popfd" \
214 parm [edx] nomemory \
215 value [eax] \
216 modify exact [edx] nomemory;
[75131]217#endif
[58699]218
[58749]219#undef ASMClearFlags
[75131]220#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]221#pragma aux ASMClearFlags = \
[58701]222 "pushfd" \
223 "pop eax" \
224 "and edx, eax" \
225 "push edx" \
226 "popfd" \
227 parm [edx] nomemory \
228 value [eax] \
229 modify exact [edx] nomemory;
[75131]230#endif
[58699]231
232/* Note! Must use the 64-bit integer return value convension.
233 The order of registers in the value [set] does not seem to mean anything. */
[58749]234#undef ASMReadTSC
[75131]235#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]236#pragma aux ASMReadTSC = \
237 ".586" \
238 "rdtsc" \
239 parm [] nomemory \
[58701]240 value [eax edx] \
241 modify exact [edx eax] nomemory;
[75131]242#endif
[58699]243
[58749]244#undef ASMReadTscWithAux
[75131]245#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]246#pragma aux ASMReadTscWithAux = \
247 0x0f 0x01 0xf9 \
[59529]248 "mov [ebx], ecx" \
249 parm [ebx] \
[58701]250 value [eax edx] \
[59529]251 modify exact [eax edx ecx];
[75131]252#endif
[58699]253
254/* ASMCpuId: Implemented externally, too many parameters. */
255/* ASMCpuId_Idx_ECX: Implemented externally, too many parameters. */
256/* ASMCpuIdExSlow: Always implemented externally. */
[58701]257
[58749]258#undef ASMCpuId_ECX_EDX
[75131]259#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]260#pragma aux ASMCpuId_ECX_EDX = \
[75131]261 ".586" \
[58701]262 "cpuid" \
263 "mov [edi], ecx" \
264 "mov [esi], edx" \
[65397]265 parm [eax] [edi] [esi] \
[58701]266 modify exact [eax ebx ecx edx];
[75131]267#endif
[58701]268
[58749]269#undef ASMCpuId_EAX
[75131]270#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]271#pragma aux ASMCpuId_EAX = \
[75131]272 ".586" \
[58701]273 "cpuid" \
[65397]274 parm [eax] \
[58701]275 value [eax] \
276 modify exact [eax ebx ecx edx];
[75131]277#endif
[58701]278
[58749]279#undef ASMCpuId_EBX
[75131]280#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]281#pragma aux ASMCpuId_EBX = \
[75131]282 ".586" \
[58701]283 "cpuid" \
[65397]284 parm [eax] \
[58701]285 value [ebx] \
286 modify exact [eax ebx ecx edx];
[75131]287#endif
[58701]288
[58749]289#undef ASMCpuId_ECX
[75131]290#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]291#pragma aux ASMCpuId_ECX = \
[75131]292 ".586" \
[58701]293 "cpuid" \
[65397]294 parm [eax] \
[58701]295 value [ecx] \
296 modify exact [eax ebx ecx edx];
[75131]297#endif
[58701]298
[58749]299#undef ASMCpuId_EDX
[75131]300#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]301#pragma aux ASMCpuId_EDX = \
[75131]302 ".586" \
[58701]303 "cpuid" \
[65397]304 parm [eax] \
[58701]305 value [edx] \
306 modify exact [eax ebx ecx edx];
[75131]307#endif
[58701]308
[58699]309/* ASMHasCpuId: MSC inline in main source file. */
310
[75131]311#undef ASMGetApicId
312#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
313#pragma aux ASMGetApicId = \
314 ".586" \
315 "xor eax, eax" \
316 "cpuid" \
317 "shr ebx,24" \
318 parm [] \
319 value [bl] \
320 modify exact [eax ebx ecx edx];
321#endif
322
[58749]323#undef ASMGetCR0
[75131]324#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]325#pragma aux ASMGetCR0 = \
326 "mov eax, cr0" \
327 parm [] nomemory \
[58701]328 value [eax] \
329 modify exact [eax] nomemory;
[75131]330#endif
[58699]331
[58749]332#undef ASMSetCR0
[75131]333#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]334#pragma aux ASMSetCR0 = \
[58701]335 "mov cr0, eax" \
336 parm [eax] nomemory \
337 modify exact [] nomemory;
[75131]338#endif
[58699]339
[58749]340#undef ASMGetCR2
[75131]341#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]342#pragma aux ASMGetCR2 = \
343 "mov eax, cr2" \
344 parm [] nomemory \
[58701]345 value [eax] \
346 modify exact [eax] nomemory;
[75131]347#endif
[58699]348
[58749]349#undef ASMSetCR2
[75131]350#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]351#pragma aux ASMSetCR2 = \
[58701]352 "mov cr2, eax" \
353 parm [eax] nomemory \
354 modify exact [] nomemory;
[75131]355#endif
[58699]356
[58749]357#undef ASMGetCR3
[75131]358#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]359#pragma aux ASMGetCR3 = \
360 "mov eax, cr3" \
361 parm [] nomemory \
[58701]362 value [eax] \
363 modify exact [eax] nomemory;
[75131]364#endif
[58699]365
[58749]366#undef ASMSetCR3
[75131]367#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]368#pragma aux ASMSetCR3 = \
[58701]369 "mov cr3, eax" \
370 parm [eax] nomemory \
371 modify exact [] nomemory;
[75131]372#endif
[58699]373
[58749]374#undef ASMReloadCR3
[75131]375#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]376#pragma aux ASMReloadCR3 = \
377 "mov eax, cr3" \
378 "mov cr3, eax" \
379 parm [] nomemory \
[58701]380 modify exact [eax] nomemory;
[75131]381#endif
[58699]382
[58749]383#undef ASMGetCR4
[75131]384#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]385#pragma aux ASMGetCR4 = \
386 "mov eax, cr4" \
387 parm [] nomemory \
[58701]388 value [eax] \
389 modify exact [eax] nomemory;
[75131]390#endif
[58699]391
[58749]392#undef ASMSetCR4
[75131]393#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]394#pragma aux ASMSetCR4 = \
[58701]395 "mov cr4, eax" \
396 parm [eax] nomemory \
397 modify exact [] nomemory;
[75131]398#endif
[58699]399
[58701]400/* ASMGetCR8: Don't bother for 32-bit. */
401/* ASMSetCR8: Don't bother for 32-bit. */
[58699]402
[58749]403#undef ASMIntEnable
[75131]404#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]405#pragma aux ASMIntEnable = \
406 "sti" \
407 parm [] nomemory \
408 modify exact [] nomemory;
[75131]409#endif
[58699]410
[58749]411#undef ASMIntDisable
[75131]412#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]413#pragma aux ASMIntDisable = \
414 "cli" \
415 parm [] nomemory \
416 modify exact [] nomemory;
[75131]417#endif
[58699]418
[58749]419#undef ASMIntDisableFlags
[75131]420#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]421#pragma aux ASMIntDisableFlags = \
[58701]422 "pushfd" \
[58699]423 "cli" \
[58701]424 "pop eax" \
[58699]425 parm [] nomemory \
[58701]426 value [eax] \
[58699]427 modify exact [] nomemory;
[75131]428#endif
[58699]429
[58749]430#undef ASMHalt
[75131]431#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]432#pragma aux ASMHalt = \
433 "hlt" \
434 parm [] nomemory \
435 modify exact [] nomemory;
[75131]436#endif
[58699]437
[58749]438#undef ASMRdMsr
[75131]439#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]440#pragma aux ASMRdMsr = \
441 ".586" \
442 "rdmsr" \
[58701]443 parm [ecx] nomemory \
444 value [eax edx] \
445 modify exact [eax edx] nomemory;
[75131]446#endif
[58699]447
[58749]448#undef ASMWrMsr
[75131]449#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]450#pragma aux ASMWrMsr = \
451 ".586" \
452 "wrmsr" \
453 parm [ecx] [eax edx] nomemory \
454 modify exact [] nomemory;
[75131]455#endif
[58699]456
[58749]457#undef ASMRdMsrEx
[75131]458#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]459#pragma aux ASMRdMsrEx = \
460 ".586" \
461 "rdmsr" \
462 parm [ecx] [edi] nomemory \
463 value [eax edx] \
464 modify exact [eax edx] nomemory;
[75131]465#endif
[58701]466
[58749]467#undef ASMWrMsrEx
[75131]468#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]469#pragma aux ASMWrMsrEx = \
470 ".586" \
471 "wrmsr" \
472 parm [ecx] [edi] [eax edx] nomemory \
473 modify exact [] nomemory;
[75131]474#endif
[58701]475
[58749]476#undef ASMRdMsr_Low
[75131]477#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]478#pragma aux ASMRdMsr_Low = \
479 ".586" \
480 "rdmsr" \
[58701]481 parm [ecx] nomemory \
482 value [eax] \
483 modify exact [eax edx] nomemory;
[75131]484#endif
[58699]485
[58749]486#undef ASMRdMsr_High
[75131]487#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]488#pragma aux ASMRdMsr_High = \
489 ".586" \
490 "rdmsr" \
[58701]491 parm [ecx] nomemory \
492 value [edx] \
493 modify exact [eax edx] nomemory;
[75131]494#endif
[58699]495
496
[58749]497#undef ASMGetDR0
[75131]498#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]499#pragma aux ASMGetDR0 = \
500 "mov eax, dr0" \
501 parm [] nomemory \
[58701]502 value [eax] \
503 modify exact [eax] nomemory;
[75131]504#endif
[58699]505
[58749]506#undef ASMGetDR1
[75131]507#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]508#pragma aux ASMGetDR1 = \
509 "mov eax, dr1" \
510 parm [] nomemory \
[58701]511 value [eax] \
512 modify exact [eax] nomemory;
[75131]513#endif
[58699]514
[58749]515#undef ASMGetDR2
[75131]516#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]517#pragma aux ASMGetDR2 = \
518 "mov eax, dr2" \
519 parm [] nomemory \
[58701]520 value [eax] \
521 modify exact [eax] nomemory;
[75131]522#endif
[58699]523
[58749]524#undef ASMGetDR3
[75131]525#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]526#pragma aux ASMGetDR3 = \
527 "mov eax, dr3" \
528 parm [] nomemory \
[58701]529 value [eax] \
530 modify exact [eax] nomemory;
[75131]531#endif
[58699]532
[58749]533#undef ASMGetDR6
[75131]534#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]535#pragma aux ASMGetDR6 = \
536 "mov eax, dr6" \
537 parm [] nomemory \
[58701]538 value [eax] \
539 modify exact [eax] nomemory;
[75131]540#endif
[58699]541
[58749]542#undef ASMGetAndClearDR6
[75131]543#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]544#pragma aux ASMGetAndClearDR6 = \
545 "mov edx, 0ffff0ff0h" \
546 "mov eax, dr6" \
547 "mov dr6, edx" \
548 parm [] nomemory \
[58701]549 value [eax] \
550 modify exact [eax edx] nomemory;
[75131]551#endif
[58699]552
[58749]553#undef ASMGetDR7
[75131]554#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]555#pragma aux ASMGetDR7 = \
556 "mov eax, dr7" \
557 parm [] nomemory \
[58701]558 value [eax] \
559 modify exact [eax] nomemory;
[75131]560#endif
[58699]561
[58749]562#undef ASMSetDR0
[75131]563#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]564#pragma aux ASMSetDR0 = \
[58701]565 "mov dr0, eax" \
566 parm [eax] nomemory \
567 modify exact [] nomemory;
[75131]568#endif
[58699]569
[58749]570#undef ASMSetDR1
[75131]571#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]572#pragma aux ASMSetDR1 = \
[58701]573 "mov dr1, eax" \
574 parm [eax] nomemory \
575 modify exact [] nomemory;
[75131]576#endif
[58699]577
[58749]578#undef ASMSetDR2
[75131]579#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]580#pragma aux ASMSetDR2 = \
[58701]581 "mov dr2, eax" \
582 parm [eax] nomemory \
583 modify exact [] nomemory;
[75131]584#endif
[58699]585
[58749]586#undef ASMSetDR3
[75131]587#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]588#pragma aux ASMSetDR3 = \
[58701]589 "mov dr3, eax" \
590 parm [eax] nomemory \
591 modify exact [] nomemory;
[75131]592#endif
[58699]593
[58749]594#undef ASMSetDR6
[75131]595#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]596#pragma aux ASMSetDR6 = \
[58701]597 "mov dr6, eax" \
598 parm [eax] nomemory \
599 modify exact [] nomemory;
[75131]600#endif
[58699]601
[58749]602#undef ASMSetDR7
[75131]603#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]604#pragma aux ASMSetDR7 = \
[58701]605 "mov dr7, eax" \
606 parm [eax] nomemory \
607 modify exact [] nomemory;
[75131]608#endif
[58699]609
610/* Yeah, could've used outp here, but this keeps the main file simpler. */
[58749]611#undef ASMOutU8
[75131]612#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]613#pragma aux ASMOutU8 = \
614 "out dx, al" \
615 parm [dx] [al] nomemory \
616 modify exact [] nomemory;
[75131]617#endif
[58699]618
[58749]619#undef ASMInU8
[75131]620#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]621#pragma aux ASMInU8 = \
622 "in al, dx" \
623 parm [dx] nomemory \
624 value [al] \
625 modify exact [] nomemory;
[75131]626#endif
[58699]627
[58749]628#undef ASMOutU16
[75131]629#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]630#pragma aux ASMOutU16 = \
631 "out dx, ax" \
632 parm [dx] [ax] nomemory \
633 modify exact [] nomemory;
[75131]634#endif
[58699]635
[58749]636#undef ASMInU16
[75131]637#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]638#pragma aux ASMInU16 = \
639 "in ax, dx" \
640 parm [dx] nomemory \
641 value [ax] \
642 modify exact [] nomemory;
[75131]643#endif
[58699]644
[58749]645#undef ASMOutU32
[75131]646#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]647#pragma aux ASMOutU32 = \
648 "out dx, eax" \
[58701]649 parm [dx] [eax] nomemory \
[58699]650 modify exact [] nomemory;
[75131]651#endif
[58699]652
[58749]653#undef ASMInU32
[75131]654#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]655#pragma aux ASMInU32 = \
656 "in eax, dx" \
657 parm [dx] nomemory \
[58701]658 value [eax] \
[58699]659 modify exact [] nomemory;
[75131]660#endif
[58699]661
[58749]662#undef ASMOutStrU8
[75131]663#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]664#pragma aux ASMOutStrU8 = \
665 "rep outsb" \
[58701]666 parm [dx] [esi] [ecx] nomemory \
667 modify exact [esi ecx] nomemory;
[75131]668#endif
[58699]669
[58749]670#undef ASMInStrU8
[75131]671#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]672#pragma aux ASMInStrU8 = \
673 "rep insb" \
[58701]674 parm [dx] [edi] [ecx] \
675 modify exact [edi ecx];
[75131]676#endif
[58699]677
[58749]678#undef ASMOutStrU16
[75131]679#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]680#pragma aux ASMOutStrU16 = \
681 "rep outsw" \
[58701]682 parm [dx] [esi] [ecx] nomemory \
683 modify exact [esi ecx] nomemory;
[75131]684#endif
[58699]685
[58749]686#undef ASMInStrU16
[75131]687#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]688#pragma aux ASMInStrU16 = \
689 "rep insw" \
[58701]690 parm [dx] [edi] [ecx] \
691 modify exact [edi ecx];
[75131]692#endif
[58699]693
[58749]694#undef ASMOutStrU32
[75131]695#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]696#pragma aux ASMOutStrU32 = \
697 "rep outsd" \
[58701]698 parm [dx] [esi] [ecx] nomemory \
699 modify exact [esi ecx] nomemory;
[75131]700#endif
[58699]701
[58749]702#undef ASMInStrU32
[75131]703#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]704#pragma aux ASMInStrU32 = \
705 "rep insd" \
[58701]706 parm [dx] [edi] [ecx] \
707 modify exact [edi ecx];
[75131]708#endif
[58699]709
[58749]710#undef ASMInvalidatePage
[75131]711#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58701]712#pragma aux ASMInvalidatePage = \
713 "invlpg [eax]" \
714 parm [eax] \
715 modify exact [];
[75131]716#endif
[58699]717
[58749]718#undef ASMWriteBackAndInvalidateCaches
[75131]719#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]720#pragma aux ASMWriteBackAndInvalidateCaches = \
721 ".486" \
722 "wbinvd" \
723 parm [] nomemory \
724 modify exact [] nomemory;
[75131]725#endif
[58699]726
[58749]727#undef ASMInvalidateInternalCaches
[75131]728#ifdef IPRT_ASM_AMD64_X86_WATCOM_32_INSTANTIATE
[58699]729#pragma aux ASMInvalidateInternalCaches = \
730 ".486" \
731 "invd" \
732 parm [] \
733 modify exact [];
[75131]734#endif
[58699]735
[76585]736#endif /* !IPRT_INCLUDED_asm_amd64_x86_watcom_32_h */
[58699]737
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use