File: bare3.ms

package info (click to toggle)
gdb-doc 16.3-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 244,264 kB
  • sloc: ansic: 2,134,731; asm: 375,582; exp: 206,875; cpp: 73,639; makefile: 70,232; sh: 26,038; python: 13,697; yacc: 11,341; ada: 7,358; xml: 6,098; perl: 5,077; pascal: 3,389; tcl: 2,986; f90: 2,764; lisp: 1,984; cs: 879; lex: 738; sed: 228; awk: 181; objc: 137; fortran: 57
file content (41 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (34)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# mach: crisv32
# ld: -N --oformat binary --section-start=.text=0x10000000
# sim: --architecture crisv32 --target binary --cris-program-offset=0x10000000 --cris-start-address=0x10000040 --cris-naked --memory-region 0x10000000,0x1000
 .include "testutils.inc"

; Test that we can load a binary program at a non-zero address.
; Also serves to exercise the --cris-program-offset and
; --cris-start-address options.

; Make sure starting at the first address does fail.
 fail

; ...and that we know an offset we can jump for it to work, and all we
; have to assume is that "fail" takes no more than 64 bytes.
 .p2align 6
 ba _start
 nop

; 
 start
x:

; Make sure we're loaded at the linked address.  Since we're re-used
; in other tests, we have to provide for non-v32 as well.
 .if ..asm.arch.cris.v32
 lapcq .,$r0
 .else
 move.d $pc,$r0
 subq .-x,$r0
 .endif

 cmp.d x,$r0
 bne y
 nop
 pass
y:
 fail

; Make sure we have enough contents for the mapping.
 .data
 .fill 4096,1,0