Jump to content

Mavericks kernel testing on AMD (formerly Mountain Lion kernel testing on AMD)


theconnactic
 Share

6,414 posts in this topic

Recommended Posts

maybe could just redirect it to fistp for now?

 

edit:  see http://software.intel.com/en-us/articles/implement-the-fisttp-streaming-simd-extensions-3-instruction

 

it seems like fistp + the appropriate rounding mode would do.

I tested it...

I found the proper way...

truncl + fistp

Little test I made for the emulator:

#include <stdio.h>
#include <pmmintrin.h>
#include <math.h>

void sse3_test_fisttps(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttps %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpl(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttpl %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpq(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttpq %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttps_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistps %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpl_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistpl %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpq_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistpq %0" : : "m" (value));
	*r = (int)value;
}

long double p1;
long double p2;
int ret;
int chk;
int bad;

int main(void)
{
  int i;

  bad = 0;

  for (i = 0; i < 1000000; ++i)
  {
      p1 += 1.111111;
      p2 -= 1.111111;

      sse3_test_fisttps(p1, &ret);
      sse3_test_fisttps_emu(p1, &chk);

      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttps value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttps(p2, &ret);
      sse3_test_fisttps_emu(p2, &chk);
      
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttps value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }

      sse3_test_fisttpl(p1, &ret);
      sse3_test_fisttpl_emu(p1, &chk);
      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttpl value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttpl(p2, &ret);
      sse3_test_fisttpl_emu(p2, &chk);
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttpl value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }

      sse3_test_fisttpq(p1, &ret);
      sse3_test_fisttpq_emu(p1, &chk);
      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttpq value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttpq(p2, &ret);
      sse3_test_fisttpq_emu(p2, &chk);
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttpq value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }
  }

  if (bad > 0)
  {
      printf("fisttp emulator NOK: %d bad emulated instructions\n", bad);
  } else {
      printf("fisttp emulator OK\n");
  }

  return(0);
}

  • Like 2
Link to comment
Share on other sites

With AMD 64 3000+ and Bronyas "mach_10.9_beta" I do get the following error running continously very quickly over the screen:

invalid kernel opcode (64-bit) a1 b9 8f 80 7f ff ff ff 08 00 00 00 00 00 00 00

I can see some other messages running over the screen too quickly to read between always the same message described above.

Then after some time it reboots.

 

On the Phenom X4 9600 the "mach_10.9_beta" works fine (like the PM2 kernel) and also PStateChanger works.

  • Like 1
Link to comment
Share on other sites

With AMD 64 3000+ and Bronyas "mach_10.9_beta" I do get the following error running continously very quickly over the screen:

invalid kernel opcode (64-bit) a1 b9 8f 80 7f ff ff ff 08 00 00 00 00 00 00 00

I can see some other messages running over the screen too quickly to read between always the same message described above.

Then after some time it reboots.

 

On the Phenom X4 9600 the "mach_10.9_beta" works fine (like the PM2 kernel) and also PStateChanger works.

:) 

 

on 3000+ is chipset SIS or AMD ?  

Link to comment
Share on other sites

thanks

can you test latest imove or final cut pro and see if there problem on rendering &viewing videos on them

thanks

so far no problems with latest imovie .

the only problems are well known icloud ,facetime ...etc etc

post-992298-0-38393800-1384545643_thumb.png

  • Like 1
Link to comment
Share on other sites

bronya's latest kernel results in:

 

invalid kernel ip, won't attempt to handle trap

opemu: (something about an invalid opcode): 62 88 1e 00 80 ff ff ff 08 00 00 00 00 00 00 00

 

being printed to the screen over and over and over until I power the computer off. (CPU: AMD A6-3400m, boot flags: -v -cpufamily busratio=20)

Link to comment
Share on other sites

 

I tested it...

I found the proper way...

truncl + fistp

Little test I made for the emulator:

#include <stdio.h>
#include <pmmintrin.h>
#include <math.h>

void sse3_test_fisttps(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttps %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpl(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttpl %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpq(long double i1, int *r)
{
	long double value = i1;
	__asm__ ("fisttpq %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttps_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistps %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpl_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistpl %0" : : "m" (value));
	*r = (int)value;
}

void sse3_test_fisttpq_emu(long double i1, int *r)
{
	long double value = truncl(i1);
	__asm__ ("fistpq %0" : : "m" (value));
	*r = (int)value;
}

long double p1;
long double p2;
int ret;
int chk;
int bad;

int main(void)
{
  int i;

  bad = 0;

  for (i = 0; i < 1000000; ++i)
  {
      p1 += 1.111111;
      p2 -= 1.111111;

      sse3_test_fisttps(p1, &ret);
      sse3_test_fisttps_emu(p1, &chk);

      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttps value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttps(p2, &ret);
      sse3_test_fisttps_emu(p2, &chk);
      
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttps value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }

      sse3_test_fisttpl(p1, &ret);
      sse3_test_fisttpl_emu(p1, &chk);
      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttpl value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttpl(p2, &ret);
      sse3_test_fisttpl_emu(p2, &chk);
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttpl value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }

      sse3_test_fisttpq(p1, &ret);
      sse3_test_fisttpq_emu(p1, &chk);
      if (ret != chk)
      {
          printf("Bad positive emu result\n");
          printf("Source value: %Lf\n", p1);
          printf("fisttpq value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");

          ++bad;
      }

      sse3_test_fisttpq(p2, &ret);
      sse3_test_fisttpq_emu(p2, &chk);
      if (ret != chk)
      {
          printf("Bad negative emu result\n");
          printf("Source value: %Lf\n", p2);
          printf("fisttpq value: %d\n", ret);
          printf("emulated  val: %d\n", chk);
          printf("\n");
          
          ++bad;
      }
  }

  if (bad > 0)
  {
      printf("fisttp emulator NOK: %d bad emulated instructions\n", bad);
  } else {
      printf("fisttp emulator OK\n");
  }

  return(0);
}

 

Is this the result that was required? 

fisttp emulator OK

Made the app in xCode and opened it with Terminal. Will older CPUs be supported by this new emulation?

  • Like 1
Link to comment
Share on other sites

Is this the result that was required?

fisttp emulator OK
Made the app in xCode and opened it with Terminal. Will older CPUs be supported by this new emulation?
Yes it is.

It tests 2000000 values of the emulation code with the real fisttp calls

Still need to code and fetching and storing for SSE3 and implement proper function for fisttps, fisttpl and fisttpq.

For that I also need to implement the truncf, trunc and truncl functions.

I can use those from newlib.

I already fetched newlib from cvs server (had to adapt and build cvs from sources to do that ;))

Keep you posted... :D

  • Like 2
Link to comment
Share on other sites

Yes it is.

It tests 2000000 values of the emulation code with the real fisttp calls

Still need to code and fetching and storing for SSE3 and implement proper function for fisttps, fisttpl and fisttpq.

For that I also need to implement the truncf, trunc and truncl functions.

I can use those from newlib.

I already fetched newlib from cvs server (had to adapt and build cvs from sources to do that ;))

Keep you posted... :D

 

Don't understand that but sound promising :D Will be available for testing on an Athlon II X2 215 and AMD Turion 64 X2 ;)

Link to comment
Share on other sites

Yes it is.

It tests 2000000 values of the emulation code with the real fisttp calls

Still need to code and fetching and storing for SSE3 and implement proper function for fisttps, fisttpl and fisttpq.

For that I also need to implement the truncf, trunc and truncl functions.

I can use those from newlib.

I already fetched newlib from cvs server (had to adapt and build cvs from sources to do that ;))

Keep you posted... :D

there's a chance you might not even need newlib.. the code i posted, you should be good calling FISTP since it does the same thing, just need to set the proper rounding modes, and then restore after the operation..

never mind, it does truncation as well. just import newlib. if you need help with that i can do it

  • Like 1
Link to comment
Share on other sites

I do not know if this here help but here it is ;). . .

/ OS X 10.9 / Beta Kernel / AMD FX-4100 / 7870 /

 

In Core proffil is showing 4.2, 4.3, 4.4 UnSUPPORTED

post-968257-0-39097400-1384565828_thumb.png

And in Compatibiliti mod its showing 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4 as UnSUPPORTED

post-968257-0-70651600-1384565836_thumb.png

Link to comment
Share on other sites

Hi..Guys, I found diferrences about kernel_task memory consumption between my intel machine and amd machine, with amd seem too high memory consumption http://cl.ly/image/0N0O0T232o02  

 

edited: there is no difference kernel_task memory consumption between intel and amd (sorry  :( )

 

Update to build 13B27 (with bronya beta kernel) and find this: http://cl.ly/image/3t0z0R0r0W38/o

Link to comment
Share on other sites

 Share

×
×
  • Create New...