2017-08-02 08:17:09 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 The WebM project authors. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VPX_PORTS_ASMDEFS_MMI_H_
|
|
|
|
#define VPX_PORTS_ASMDEFS_MMI_H_
|
|
|
|
|
|
|
|
#include "./vpx_config.h"
|
|
|
|
#include "vpx/vpx_integer.h"
|
|
|
|
|
|
|
|
#if HAVE_MMI
|
|
|
|
|
|
|
|
#if HAVE_MIPS64
|
|
|
|
#define mips_reg int64_t
|
|
|
|
#define MMI_ADDU(reg1, reg2, reg3) \
|
|
|
|
"daddu " #reg1 ", " #reg2 ", " #reg3 " \n\t"
|
|
|
|
|
|
|
|
#define MMI_ADDIU(reg1, reg2, immediate) \
|
|
|
|
"daddiu " #reg1 ", " #reg2 ", " #immediate " \n\t"
|
|
|
|
|
|
|
|
#define MMI_ADDI(reg1, reg2, immediate) \
|
|
|
|
"daddi " #reg1 ", " #reg2 ", " #immediate " \n\t"
|
|
|
|
|
|
|
|
#define MMI_SUBU(reg1, reg2, reg3) \
|
|
|
|
"dsubu " #reg1 ", " #reg2 ", " #reg3 " \n\t"
|
|
|
|
|
|
|
|
#define MMI_L(reg, addr, bias) \
|
|
|
|
"ld " #reg ", " #bias "(" #addr ") \n\t"
|
|
|
|
|
|
|
|
#define MMI_SRL(reg1, reg2, shift) \
|
|
|
|
"dsrl " #reg1 ", " #reg2 ", " #shift " \n\t"
|
|
|
|
|
|
|
|
#define MMI_SLL(reg1, reg2, shift) \
|
|
|
|
"dsll " #reg1 ", " #reg2 ", " #shift " \n\t"
|
|
|
|
|
|
|
|
#define MMI_MTC1(reg, fp) \
|
2017-08-24 17:11:58 +02:00
|
|
|
"dmtc1 " #reg ", " #fp " \n\t"
|
2017-08-02 08:17:09 +02:00
|
|
|
|
|
|
|
#define MMI_LI(reg, immediate) \
|
2017-08-24 17:11:58 +02:00
|
|
|
"dli " #reg ", " #immediate " \n\t"
|
2017-08-02 08:17:09 +02:00
|
|
|
|
|
|
|
#else
|
|
|
|
#define mips_reg int32_t
|
|
|
|
#define MMI_ADDU(reg1, reg2, reg3) \
|
|
|
|
"addu " #reg1 ", " #reg2 ", " #reg3 " \n\t"
|
|
|
|
|
|
|
|
#define MMI_ADDIU(reg1, reg2, immediate) \
|
|
|
|
"addiu " #reg1 ", " #reg2 ", " #immediate " \n\t"
|
|
|
|
|
|
|
|
#define MMI_ADDI(reg1, reg2, immediate) \
|
|
|
|
"addi " #reg1 ", " #reg2 ", " #immediate " \n\t"
|
|
|
|
|
|
|
|
#define MMI_SUBU(reg1, reg2, reg3) \
|
|
|
|
"subu " #reg1 ", " #reg2 ", " #reg3 " \n\t"
|
|
|
|
|
|
|
|
#define MMI_L(reg, addr, bias) \
|
|
|
|
"lw " #reg ", " #bias "(" #addr ") \n\t"
|
|
|
|
|
|
|
|
#define MMI_SRL(reg1, reg2, shift) \
|
|
|
|
"srl " #reg1 ", " #reg2 ", " #shift " \n\t"
|
|
|
|
|
|
|
|
#define MMI_SLL(reg1, reg2, shift) \
|
|
|
|
"sll " #reg1 ", " #reg2 ", " #shift " \n\t"
|
|
|
|
|
|
|
|
#define MMI_MTC1(reg, fp) \
|
2017-08-24 17:11:58 +02:00
|
|
|
"mtc1 " #reg ", " #fp " \n\t"
|
2017-08-02 08:17:09 +02:00
|
|
|
|
|
|
|
#define MMI_LI(reg, immediate) \
|
2017-08-24 17:11:58 +02:00
|
|
|
"li " #reg ", " #immediate " \n\t"
|
2017-08-02 08:17:09 +02:00
|
|
|
|
|
|
|
#endif /* HAVE_MIPS64 */
|
|
|
|
|
|
|
|
#endif /* HAVE_MMI */
|
|
|
|
|
|
|
|
#endif /* VPX_PORTS_ASMDEFS_MMI_H_ */
|