Date: Mon, 26 Nov 2018 19:14:33 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340990 - head/stand/i386/btx/lib Message-ID: <201811261914.wAQJEX4C070922@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Nov 26 19:14:33 2018 New Revision: 340990 URL: https://svnweb.freebsd.org/changeset/base/340990 Log: btx: rename .s files to .S to use Clang IAS As part of the migration away from obsolete binutils we want to retire GNU as. Most assembly files used on amd64 have a .S extension and are assembled with Clang's integrated assembler; rename two files in stand/i386/btx/lib to .S to use IAS as well. The generated .text is identical (the entire .o files are not, as Clang adds debug info). PR: 205250, 233094 Discussed with: imp Sponsored by: The FreeBSD Foundation Added: head/stand/i386/btx/lib/btxsys.S - copied unchanged from r340989, head/stand/i386/btx/lib/btxsys.s head/stand/i386/btx/lib/btxv86.S - copied unchanged from r340989, head/stand/i386/btx/lib/btxv86.s Deleted: head/stand/i386/btx/lib/btxsys.s head/stand/i386/btx/lib/btxv86.s Modified: head/stand/i386/btx/lib/Makefile Modified: head/stand/i386/btx/lib/Makefile ============================================================================== --- head/stand/i386/btx/lib/Makefile Mon Nov 26 18:46:15 2018 (r340989) +++ head/stand/i386/btx/lib/Makefile Mon Nov 26 19:14:33 2018 (r340990) @@ -4,7 +4,7 @@ PROG= crt0.o INTERNALPROG= -SRCS= btxcsu.S btxsys.s btxv86.s +SRCS= btxcsu.S btxsys.S btxv86.S CFLAGS+=-I${BOOTSRC}/i386/common LDFLAGS+=-Wl,-r Copied: head/stand/i386/btx/lib/btxsys.S (from r340989, head/stand/i386/btx/lib/btxsys.s) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/i386/btx/lib/btxsys.S Mon Nov 26 19:14:33 2018 (r340990, copy of r340989, head/stand/i386/btx/lib/btxsys.s) @@ -0,0 +1,40 @@ +# +# Copyright (c) 1998 Robert Nordier +# All rights reserved. +# +# Redistribution and use in source and binary forms are freely +# permitted provided that the above copyright notice and this +# paragraph and the following disclaimer are duplicated in all +# such forms. +# +# This software is provided "AS IS" and without any express or +# implied warranties, including, without limitation, the implied +# warranties of merchantability and fitness for a particular +# purpose. +# + +# $FreeBSD$ + +# +# BTX system calls. +# + +# +# Globals. +# + .global __exit + .global __exec +# +# Constants. +# + .set INT_SYS,0x30 # Interrupt number +# +# System call: exit +# +__exit: xorl %eax,%eax # BTX system + int $INT_SYS # call 0x0 +# +# System call: exec +# +__exec: movl $0x1,%eax # BTX system + int $INT_SYS # call 0x1 Copied: head/stand/i386/btx/lib/btxv86.S (from r340989, head/stand/i386/btx/lib/btxv86.s) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/stand/i386/btx/lib/btxv86.S Mon Nov 26 19:14:33 2018 (r340990, copy of r340989, head/stand/i386/btx/lib/btxv86.s) @@ -0,0 +1,85 @@ +# +# Copyright (c) 1998 Robert Nordier +# All rights reserved. +# +# Redistribution and use in source and binary forms are freely +# permitted provided that the above copyright notice and this +# paragraph and the following disclaimer are duplicated in all +# such forms. +# +# This software is provided "AS IS" and without any express or +# implied warranties, including, without limitation, the implied +# warranties of merchantability and fitness for a particular +# purpose. +# + +# $FreeBSD$ + +# +# BTX V86 interface. +# + +# +# Globals. +# + .global __v86int +# +# Fields in V86 interface structure. +# + .set V86_CTL,0x0 # Control flags + .set V86_ADDR,0x4 # Int number/address + .set V86_ES,0x8 # V86 ES + .set V86_DS,0xc # V86 DS + .set V86_FS,0x10 # V86 FS + .set V86_GS,0x14 # V86 GS + .set V86_EAX,0x18 # V86 EAX + .set V86_ECX,0x1c # V86 ECX + .set V86_EDX,0x20 # V86 EDX + .set V86_EBX,0x24 # V86 EBX + .set V86_EFL,0x28 # V86 eflags + .set V86_EBP,0x2c # V86 EBP + .set V86_ESI,0x30 # V86 ESI + .set V86_EDI,0x34 # V86 EDI +# +# Other constants. +# + .set INT_V86,0x31 # Interrupt number + .set SIZ_V86,0x38 # Size of V86 structure +# +# V86 interface function. +# +__v86int: popl __v86ret # Save return address + pushl $__v86 # Push pointer + call __v86_swap # Load V86 registers + int $INT_V86 # To BTX + call __v86_swap # Load user registers + addl $0x4,%esp # Discard pointer + pushl __v86ret # Restore return address + ret # To user +# +# Swap V86 and user registers. +# +__v86_swap: xchgl %ebp,0x4(%esp,1) # Swap pointer, EBP + xchgl %eax,V86_EAX(%ebp) # Swap EAX + xchgl %ecx,V86_ECX(%ebp) # Swap ECX + xchgl %edx,V86_EDX(%ebp) # Swap EDX + xchgl %ebx,V86_EBX(%ebp) # Swap EBX + pushl %eax # Save + pushf # Put eflags + popl %eax # in EAX + xchgl %eax,V86_EFL(%ebp) # Swap + pushl %eax # Put EAX + popf # in eflags + movl 0x8(%esp,1),%eax # Load EBP + xchgl %eax,V86_EBP(%ebp) # Swap + movl %eax,0x8(%esp,1) # Save EBP + popl %eax # Restore + xchgl %esi,V86_ESI(%ebp) # Swap ESI + xchgl %edi,V86_EDI(%ebp) # Swap EDI + xchgl %ebp,0x4(%esp,1) # Swap pointer, EBP + ret # To caller +# +# V86 interface structure. +# + .comm __v86,SIZ_V86 + .comm __v86ret,4
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811261914.wAQJEX4C070922>