2
1

dmalloc-mips.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --- dmalloc/configure 2006-09-01 18:28:51.000000000 -0700
  2. +++ dmalloc-mips/configure 2006-09-01 18:49:07.000000000 -0700
  3. @@ -6114,7 +6114,7 @@
  4. echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6
  5. if test "$cross_compiling" = yes; then
  6. cat >>confdefs.h <<\_ACEOF
  7. -#define RETURN_MACROS_WORK 0
  8. +#define RETURN_MACROS_WORK 1
  9. _ACEOF
  10. echo "$as_me:$LINENO: result: no" >&5
  11. echo "${ECHO_T}no" >&6
  12. --- dmalloc/return.h 2004-10-19 07:51:21.000000000 -0700
  13. +++ dmalloc-mips/return.h 2006-09-08 21:52:43.000000000 -0700
  14. @@ -106,26 +106,16 @@
  15. /*************************************/
  16. /*
  17. - * For DEC Mips machines running Ultrix
  18. + * For Mips machines running Linux
  19. */
  20. #if __mips
  21. /*
  22. - * I have no idea how to get inline assembly with the default cc.
  23. - * Anyone know how?
  24. - */
  25. -
  26. -#if 0
  27. -
  28. -/*
  29. * NOTE: we assume here that file is global.
  30. *
  31. - * $31 is the frame pointer. $2 looks to be the return address but maybe
  32. - * not consistently.
  33. + * $31 is the return address.
  34. */
  35. -#define GET_RET_ADDR(file) asm("sw $2, file")
  36. -
  37. -#endif
  38. +#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file))
  39. #endif /* __mips */