diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-03-23 09:18:55 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:18:55 (GMT) |
commit | e5fcad302d86d316390c6b0f62759a067313e8a9 (patch) | |
tree | c2afbf6f1066b6ce261f14341cf6d310e5595bc1 /src/corelib/arch/mips | |
download | Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2 |
Long live Qt 4.5!
Diffstat (limited to 'src/corelib/arch/mips')
-rw-r--r-- | src/corelib/arch/mips/arch.pri | 8 | ||||
-rw-r--r-- | src/corelib/arch/mips/qatomic_mips32.s | 110 | ||||
-rw-r--r-- | src/corelib/arch/mips/qatomic_mips64.s | 98 |
3 files changed, 216 insertions, 0 deletions
diff --git a/src/corelib/arch/mips/arch.pri b/src/corelib/arch/mips/arch.pri new file mode 100644 index 0000000..296c845 --- /dev/null +++ b/src/corelib/arch/mips/arch.pri @@ -0,0 +1,8 @@ +# +# MIPS 3/4 architecture +# + +# note: even though we use inline assembler with gcc, we always +# include the compiled version to keep binary compatibility +*-64:SOURCES += $$QT_ARCH_CPP/qatomic_mips64.s +else:SOURCES += $$QT_ARCH_CPP/qatomic_mips32.s diff --git a/src/corelib/arch/mips/qatomic_mips32.s b/src/corelib/arch/mips/qatomic_mips32.s new file mode 100644 index 0000000..e7a449b --- /dev/null +++ b/src/corelib/arch/mips/qatomic_mips32.s @@ -0,0 +1,110 @@ + .set nobopt + .set noreorder + .option pic2 + .text + + .globl q_atomic_test_and_set_int + .ent q_atomic_test_and_set_int + .set mips2 +q_atomic_test_and_set_int: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_int + + .globl q_atomic_test_and_set_acquire_int + .ent q_atomic_test_and_set_acquire_int + .set mips2 +q_atomic_test_and_set_acquire_int: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: sync + jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_acquire_int + + .globl q_atomic_test_and_set_release_int + .ent q_atomic_test_and_set_release_int + .set mips2 +q_atomic_test_and_set_release_int: + sync +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_release_int + + .globl q_atomic_test_and_set_ptr + .ent q_atomic_test_and_set_ptr + .set mips2 +q_atomic_test_and_set_ptr: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_ptr + + .globl q_atomic_test_and_set_acquire_ptr + .ent q_atomic_test_and_set_acquire_ptr + .set mips2 +q_atomic_test_and_set_acquire_ptr: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: sync + jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_acquire_ptr + + .globl q_atomic_test_and_set_release_ptr + .ent q_atomic_test_and_set_release_ptr + .set mips2 +q_atomic_test_and_set_release_ptr: + sync +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .set mips0 + .end q_atomic_test_and_set_release_ptr diff --git a/src/corelib/arch/mips/qatomic_mips64.s b/src/corelib/arch/mips/qatomic_mips64.s new file mode 100644 index 0000000..d2bd8fe --- /dev/null +++ b/src/corelib/arch/mips/qatomic_mips64.s @@ -0,0 +1,98 @@ + .set nobopt + .set noreorder + .option pic2 + .text + + .globl q_atomic_test_and_set_int + .ent q_atomic_test_and_set_int +q_atomic_test_and_set_int: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .end q_atomic_test_and_set_int + + .globl q_atomic_test_and_set_acquire_int + .ent q_atomic_test_and_set_acquire_int +q_atomic_test_and_set_acquire_int: +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: sync + jr $31 + move $2,$0 + .end q_atomic_test_and_set_acquire_int + + .globl q_atomic_test_and_set_release_int + .ent q_atomic_test_and_set_release_int +q_atomic_test_and_set_release_int: + sync +1: ll $8,0($4) + bne $8,$5,2f + move $2,$6 + sc $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .end q_atomic_test_and_set_release_int + + .globl q_atomic_test_and_set_ptr + .ent q_atomic_test_and_set_ptr +q_atomic_test_and_set_ptr: +1: lld $8,0($4) + bne $8,$5,2f + move $2,$6 + scd $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .end q_atomic_test_and_set_ptr + + .globl q_atomic_test_and_set_acquire_ptr + .ent q_atomic_test_and_set_acquire_ptr +q_atomic_test_and_set_acquire_ptr: +1: lld $8,0($4) + bne $8,$5,2f + move $2,$6 + scd $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: sync + jr $31 + move $2,$0 + .end q_atomic_test_and_set_acquire_ptr + + .globl q_atomic_test_and_set_release_ptr + .ent q_atomic_test_and_set_release_ptr +q_atomic_test_and_set_release_ptr: + sync +1: lld $8,0($4) + bne $8,$5,2f + move $2,$6 + scd $2,0($4) + beqz $2,1b + nop + jr $31 + nop +2: jr $31 + move $2,$0 + .end q_atomic_test_and_set_release_ptr |