~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to testsuite/tests/asmcomp/arm.S

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***********************************************************************/
 
2
/*                                                                     */
 
3
/*                           Objective Caml                            */
 
4
/*                                                                     */
 
5
/*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         */
 
6
/*                                                                     */
 
7
/*  Copyright 1998 Institut National de Recherche en Informatique et   */
 
8
/*  en Automatique.  All rights reserved.  This file is distributed    */
 
9
/*  under the terms of the Q Public License version 1.0.               */
 
10
/*                                                                     */
 
11
/***********************************************************************/
 
12
 
 
13
/* $Id: arm.S 9212 2009-03-31 09:46:08Z xleroy $ */
 
14
 
 
15
        .text
 
16
 
 
17
        .global call_gen_code
 
18
        .type   call_gen_code, %function
 
19
        .align  0
 
20
call_gen_code:
 
21
        mov     ip, sp
 
22
        stmfd   sp!, {r4, r5, r6, r7, r8, r9, fp, ip, lr, pc}
 
23
        sub     fp, ip, #4
 
24
    @ r0 is function to call
 
25
    @ r1, r2, r3 are arguments 1, 2, 3
 
26
        mov     r4, r0
 
27
        mov     r0, r1
 
28
        mov     r1, r2
 
29
        mov     r2, r3
 
30
        mov     lr, pc
 
31
        mov     pc, r4
 
32
        ldmea   fp, {r4, r5, r6, r7, r8, r9, fp, sp, pc}
 
33
 
 
34
        .global caml_c_call
 
35
        .type   caml_c_call, %function
 
36
        .align  0
 
37
caml_c_call:
 
38
    @ function to call is in r10
 
39
        mov     pc, r10
 
40