Welcome! Log In Create A New Profile

Advanced

Re: nginx -t > Illegal instruction

Gena Makhomed
October 15, 2013 01:38PM
On 15.10.2013 20:06, Sergey Kandaurov wrote:

> diff -r 5483d9e77b32 src/core/ngx_cpuinfo.c
> --- a/src/core/ngx_cpuinfo.c Wed Oct 02 15:07:17 2013 +0400
> +++ b/src/core/ngx_cpuinfo.c Tue Oct 15 21:03:53 2013 +0400
> @@ -20,6 +20,20 @@ static ngx_inline void ngx_cpuid(uint32_
> static ngx_inline void
> ngx_cpuid(uint32_t i, uint32_t *buf)
> {
> + uint32_t cpu_vendor[4];
> +
> + __asm__ (
> +
> + " movl $0x4778654e, (%0);" // store vendor string
> + " movl $0x72446e65, 4(%0);"
> + " movl $0x6e657669, 8(%0);"
> + " movl $0, 12(%0);"
> +
> + : : "D" (cpu_vendor) );
> +
> + if (ngx_strcmp(cpu_vendor, "CyrixInstead") == 0) {
> + return;
> + }

есть лучший вариант - стандартный и документированный способ
проверить, поддерживает __i386__ процессор команду cpuid или нет:

http://wiki.osdev.org/CPUID

такой патч был бы более универсальным и более полезным.
вопросы про 486 процессор без cpuid периодически возникают.

--
Best regards,
Gena

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

nginx -t > Illegal instruction

Sergey Talchuk October 15, 2013 11:16AM

Re: nginx -t > Illegal instruction

Maxim Dounin October 15, 2013 11:40AM

Re: nginx -t > Illegal instruction

Sergey Kandaurov October 15, 2013 01:08PM

Re: nginx -t > Illegal instruction

Gena Makhomed October 15, 2013 01:38PM

Re: nginx -t > Illegal instruction

Igor Sysoev October 15, 2013 02:02PM

Re: nginx -t > Illegal instruction

Gena Makhomed October 15, 2013 03:20PM

Re: nginx -t > Illegal instruction

Sergey Talchuk October 18, 2013 02:44AM

Re: nginx -t > Illegal instruction

Maxim Dounin October 15, 2013 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready