reloc.c (559a218c9b257775fb249b67945fe4a05b7a6b9f) | reloc.c (9684658e35ab033c79e0519e3681d9a194976b71) |
---|---|
1/*- 2 * Copyright (c) 2018 The FreeBSD Foundation 3 * 4 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 5 * under sponsorship from the FreeBSD Foundation. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 9 unchanged lines hidden (view full) --- 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 | 1/*- 2 * Copyright (c) 2018 The FreeBSD Foundation 3 * 4 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 5 * under sponsorship from the FreeBSD Foundation. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 9 unchanged lines hidden (view full) --- 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 |
26#include <sys/cdefs.h> 27 |
|
26#include <machine/specialreg.h> 27#include <machine/cpufunc.h> 28 29static uint32_t cpu_feature, cpu_feature2; 30static uint32_t cpu_stdext_feature, cpu_stdext_feature2; 31 32static void | 28#include <machine/specialreg.h> 29#include <machine/cpufunc.h> 30 31static uint32_t cpu_feature, cpu_feature2; 32static uint32_t cpu_stdext_feature, cpu_stdext_feature2; 33 34static void |
33init_cpu_features(void) | 35ifunc_init(const Elf_Auxinfo *aux __unused) |
34{ 35 u_int p[4]; 36 37 do_cpuid(1, p); 38 cpu_feature = p[3]; 39 cpu_feature2 = p[2]; 40 do_cpuid(0, p); 41 if (p[0] >= 7) { --- 25 unchanged lines hidden --- | 36{ 37 u_int p[4]; 38 39 do_cpuid(1, p); 40 cpu_feature = p[3]; 41 cpu_feature2 = p[2]; 42 do_cpuid(0, p); 43 if (p[0] >= 7) { --- 25 unchanged lines hidden --- |