DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5216dd412535)

VCS Links

Line Code
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
    INCLUDE kxarm.h

    area js_msvc, code, readonly

    MACRO
    FUNC_HEADER $Name
FuncName    SETS    VBar:CC:"$Name":CC:VBar
PrologName  SETS    VBar:CC:"$Name":CC:"_Prolog":CC:VBar
FuncEndName SETS    VBar:CC:"$Name":CC:"_end":CC:VBar

    AREA |.pdata|,ALIGN=2,PDATA
    DCD	$FuncName
    DCD	(($PrologName-$FuncName)/4) :OR: ((($FuncEndName-$FuncName)/4):SHL:8) :OR: 0x40000000
    AREA $AreaName,CODE,READONLY
    ALIGN	2
    GLOBAL	$FuncName
    EXPORT	$FuncName
$FuncName
    ROUT
$PrologName
    MEND

    ;; -------- Functions to test processor features.
    export  js_arm_try_thumb_op
    export  js_arm_try_armv6t2_op
    export  js_arm_try_armv7_op
    export  js_arm_try_armv6_op
    export  js_arm_try_armv5_op
    export  js_arm_try_vfp_op

    ;; Test for Thumb support.
    FUNC_HEADER js_arm_try_thumb_op
    bx lr
    mov pc, lr
    ENTRY_END
    endp

    ;; I'm not smart enough to figure out which flags to pass to armasm to get it
    ;; to understand movt and fmdrr/vmov; the disassembler figures them out just fine!

    ;; Test for Thumb2 support.
    FUNC_HEADER js_arm_try_armv6t2_op
    ;; movt r0,#0xFFFF
    DCD 0xE34F0FFF
    mov pc,lr
    ENTRY_END
    endp

    ;; Test for VFP support.
    FUNC_HEADER js_arm_try_vfp_op
    ;; fmdrr d0, r0, r1
    DCD 0xEC410B10
    mov pc,lr
    ENTRY_END
    endp

    ;; Tests for each architecture version.

    FUNC_HEADER js_arm_try_armv7_op
    ;; pli pc, #0
    DCD 0xF45FF000
    mov pc, lr
    ENTRY_END
    endp

    FUNC_HEADER js_arm_try_armv6_op
    ;; rev ip, ip
    DCD 0xE6BFCF3C
    mov pc, lr
    ENTRY_END
    endp

    FUNC_HEADER js_arm_try_armv5_op
    ;; clz ip, ip
    DCD 0xE16FCF1C
    mov pc, lr
    ENTRY_END
    endp

    ;; --------

    end