+//
+// Copyright 2011 Xamarin Inc
+//
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
#ifndef __MONO_ARM_VFP_CODEGEN_H__
#define __MONO_ARM_VFP_CODEGEN_H__
#include "arm-codegen.h"
enum {
- /* FPA registers */
+ /* VFP registers */
ARM_VFP_F0,
ARM_VFP_F1,
ARM_VFP_F2,
#define ARM_FSTD(p,freg,base,offset) \
ARM_FSTD_COND(p,freg,base,offset,ARMCOND_AL)
-/* VSTM/VLDM */
-#define VSTMIA_COND(p,cond,rn,w,first_reg,nregs) ARM_EMIT((p), ((nregs * 2) << 0) | (0xb << 8) | (((first_reg) & 0xf) << 12) | ((rn) << 16) | (0 << 20) | ((w) << 21) | ((first_reg >> 4) << 22) | (1 << 23) | (0 << 24) | (0x6 << 25) | ((cond) << 28))
-#define VSTMIA(p,rn,w,first_reg,nregs) VSTMIA_COND((p), ARMCOND_AL, (rn), (w), (first_reg), (nregs))
-#define VLDMIA_COND(p,cond,rn,w,first_reg,nregs) ARM_EMIT((p), ((nregs * 2) << 0) | (0xb << 8) | (((first_reg) & 0xf) << 12) | ((rn) << 16) | (1 << 20) | ((w) << 21) | ((first_reg >> 4) << 22) | (1 << 23) | (0 << 24) | (0x6 << 25) | ((cond) << 28))
-#define VLDMIA(p,rn,w,first_reg,nregs) VLDMIA_COND((p), ARMCOND_AL, (rn), (w), (first_reg), (nregs))
+#define ARM_FLDMD_COND(p,first_reg,nregs,base,cond) \
+ ARM_EMIT((p), ARM_DEF_VFP_LSF((cond),ARM_VFP_COPROC_DOUBLE,0,ARMOP_LDR,0,(base),(first_reg),((nregs) * 2) << 2))
+
+#define ARM_FLDMD(p,first_reg,nregs,base) \
+ ARM_FLDMD_COND(p,first_reg,nregs,base,ARMCOND_AL)
+
+#define ARM_FSTMD_COND(p,first_reg,nregs,base,cond) \
+ ARM_EMIT((p), ARM_DEF_VFP_LSF((cond),ARM_VFP_COPROC_DOUBLE,0,ARMOP_STR,0,(base),(first_reg),((nregs) * 2) << 2))
+
+#define ARM_FSTMD(p,first_reg,nregs,base) \
+ ARM_FSTMD_COND(p,first_reg,nregs,base,ARMCOND_AL)
-#include "arm_vfpmacros.h"
+#include <mono/arch/arm/arm_vfpmacros.h>
/* coprocessor register transfer */
#define ARM_FMSR(p,freg,reg) \