__longjmp.S 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ;
  2. ; Port of uClibc for TMS320C6000 DSP architecture
  3. ; Copyright (C) 2004 Texas Instruments Incorporated
  4. ; Author of TMS320C6000 port: Aurelien Jacquiot
  5. ;
  6. ; This program is free software; you can redistribute it and/or modify it
  7. ; under the terms of the GNU Library General Public License as published by
  8. ; the Free Software Foundation; either version 2 of the License, or (at your
  9. ; option) any later version.
  10. ;
  11. ; This program is distributed in the hope that it will be useful, but WITHOUT
  12. ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  14. ; for more details.
  15. ;
  16. ; You should have received a copy of the GNU Library General Public License
  17. ; along with this program; if not, write to the Free Software Foundation,
  18. ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. ;
  20. .global __longjmp
  21. __longjmp:
  22. LDW .D1T1 *+A4(48),A3 ; return address
  23. MV .D2X A4,B6 ; jmp_buf pointer
  24. || MV .D1 A4,A6
  25. || MV .S2 B4,B2 ; val
  26. LDW .D1T1 *+A6(0),A10
  27. || LDW .D2T2 *+B6(4),B10
  28. || [B2] MV .S1X B4,A4
  29. ||[!B2] MVK .L1 1,A4 ; return val or 1
  30. LDW .D1T1 *+A6(8),A11
  31. || LDW .D2T2 *+B6(12),B11
  32. LDW .D1T1 *+A6(16),A12
  33. || LDW .D2T2 *+B6(20),B12
  34. LDW .D1T1 *+A6(24),A13
  35. || LDW .D2T2 *+B6(28),B13
  36. LDW .D1T1 *+A6(32),A14
  37. || LDW .D2T2 *+B6(36),B14
  38. LDW .D1T1 *+A6(40),A15
  39. || LDW .D2T2 *+B6(44),B15
  40. || B .S2X A3
  41. NOP 5
  42. libc_hidden_def(__longjmp)