no such instructions: xsave, xsetbv, xrstor

Konstantin Belousov kostikbel at
Sat Jul 21 18:36:55 UTC 2012

On Sat, Jul 21, 2012 at 07:55:23PM +0200, Arvydas Sidorenko wrote:
> This is the output I get when building 10-CURRENT from HEAD:
> /usr/src/sys/amd64/amd64/cpu_switch.S: Assembler messages:
> /usr/src/sys/amd64/amd64/cpu_switch.S:128: Error: no such instruction:
> `xsave (%r8)'
> /usr/src/sys/amd64/amd64/cpu_switch.S:504: Error: no such instruction: `xsetbv'
> /usr/src/sys/amd64/amd64/cpu_switch.S:505: Error: no such instruction:
> `xrstor (%rbx)'
> $ uname -a
> FreeBSD slacker 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12
> 02:52:29 UTC 2012
> root at  amd64
> The CPU capabilities should not impact the compilation, but here
> they're anyways (E8600):
> $ grep Features /var/run/dmesg.boot | grep -i xsave
> Is it problem with assembler? Which on my system is:
> $ as --version
> GNU assembler (GNU Binutils) 2.22
> Copyright 2011 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or later.
> This program has absolutely no warranty.
> This assembler was configured for a target of `x86_64-portbld-freebsd9.0'.
> And classic outdated GCC:
> $ gcc --version
> gcc (GCC) 4.2.1 20070831 patched [FreeBSD]
> Any help is appreciated.

You must follow the UPDATING guide on rebuilding the system, in particular,
you shall use buildworld and buildkernel procedure. Assembler in HEAD was
patched to support these instructions, and kernel now uses them instead
of using manual assembly results.

Host CPU features indeed have no relevance to your problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-amd64 mailing list