github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/memio/ioport_linux_386.s (about) 1 // Copyright 2012-2020 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // From go runtime compiler source: 6 //TODO: INB DX, AL // ec 7 //TODO: INW DX, AX // 66ed 8 //TODO: INL DX, AX // ed 9 10 TEXT ·archInb(SB),$0-5 11 MOVW arg+0(FP), DX 12 BYTE $0xec //INB DX, AL 13 MOVB AX, ret+4(FP) 14 RET 15 16 TEXT ·archInw(SB),$0-6 17 MOVW arg+0(FP), DX 18 BYTE $0x66 // Do the next instruction (INL) in 16-bit mode 19 BYTE $0xec //INW DX, AL 20 MOVW AX, ret+4(FP) 21 RET 22 23 24 TEXT ·archInl(SB),$0-8 25 MOVW arg+0(FP), DX 26 BYTE $0xed //INL DX, AL 27 MOVL AX, ret+4(FP) 28 RET 29 30 // From go runtime compiler source: 31 //TODO: OUTB AL, DX // ee 32 //TODO: OUTW AX, DX // 66ef 33 //TODO: OUTL AX, DX // ef 34 35 TEXT ·archOutb(SB),$0-3 36 MOVW arg+0(FP), DX 37 MOVB arg1+2(FP), AX 38 BYTE $0xee //OUTB DX, AL 39 RET 40 41 TEXT ·archOutw(SB),$0-4 42 MOVW arg+0(FP), DX 43 MOVW arg1+2(FP), AX 44 BYTE $0x66 // Do the next instruction (OUTL) in 16-bit mode 45 BYTE $0xef //OUTW DX, AL 46 RET 47 48 49 TEXT ·archOutl(SB),$0-8 50 MOVW arg+0(FP), DX 51 MOVL arg1+4(FP), AX 52 BYTE $0xef //OUTL DX, AL 53 RET