Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Side by Side Diff: src/ppc/assembler-ppc.h

Issue 901083004: Contribution of PowerPC port (continuation of 422063005) - PPC dir update (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port (continuation of 422063005) - PPC dir update -comments and rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/ppc/stub-cache-ppc.cc ('k') | src/ppc/assembler-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "src/ppc/constants-ppc.h" 47 #include "src/ppc/constants-ppc.h"
48 #include "src/serialize.h" 48 #include "src/serialize.h"
49 49
50 #define ABI_USES_FUNCTION_DESCRIPTORS \ 50 #define ABI_USES_FUNCTION_DESCRIPTORS \
51 (V8_HOST_ARCH_PPC && (V8_OS_AIX || \ 51 (V8_HOST_ARCH_PPC && (V8_OS_AIX || \
52 (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN))) 52 (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN)))
53 53
54 #define ABI_PASSES_HANDLES_IN_REGS \ 54 #define ABI_PASSES_HANDLES_IN_REGS \
55 (!V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64) 55 (!V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64)
56 56
57 #define ABI_RETURNS_HANDLES_IN_REGS \
58 (!V8_HOST_ARCH_PPC || V8_TARGET_LITTLE_ENDIAN)
59
60 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS \ 57 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS \
61 (!V8_HOST_ARCH_PPC || V8_TARGET_LITTLE_ENDIAN) 58 (!V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN)
62 59
63 #define ABI_TOC_ADDRESSABILITY_VIA_IP \ 60 #define ABI_TOC_ADDRESSABILITY_VIA_IP \
64 (V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN) 61 (V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN)
65 62
66 #if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 63 #if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64
67 #define ABI_TOC_REGISTER kRegister_r2_Code 64 #define ABI_TOC_REGISTER kRegister_r2_Code
68 #else 65 #else
69 #define ABI_TOC_REGISTER kRegister_r13_Code 66 #define ABI_TOC_REGISTER kRegister_r13_Code
70 #endif 67 #endif
71 68
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 bc(b_offset, BT, encode_crbit(cr, CR_SO), lk); 822 bc(b_offset, BT, encode_crbit(cr, CR_SO), lk);
826 break; 823 break;
827 case nooverflow: 824 case nooverflow:
828 bc(b_offset, BF, encode_crbit(cr, CR_SO), lk); 825 bc(b_offset, BF, encode_crbit(cr, CR_SO), lk);
829 break; 826 break;
830 default: 827 default:
831 UNIMPLEMENTED(); 828 UNIMPLEMENTED();
832 } 829 }
833 } 830 }
834 831
832 void isel(Register rt, Register ra, Register rb, int cb);
833 void isel(Condition cond, Register rt, Register ra, Register rb,
834 CRegister cr = cr7) {
835 DCHECK(cond != al);
836 DCHECK(cr.code() >= 0 && cr.code() <= 7);
837
838 switch (cond) {
839 case eq:
840 isel(rt, ra, rb, encode_crbit(cr, CR_EQ));
841 break;
842 case ne:
843 isel(rt, rb, ra, encode_crbit(cr, CR_EQ));
844 break;
845 case gt:
846 isel(rt, ra, rb, encode_crbit(cr, CR_GT));
847 break;
848 case le:
849 isel(rt, rb, ra, encode_crbit(cr, CR_GT));
850 break;
851 case lt:
852 isel(rt, ra, rb, encode_crbit(cr, CR_LT));
853 break;
854 case ge:
855 isel(rt, rb, ra, encode_crbit(cr, CR_LT));
856 break;
857 case unordered:
858 isel(rt, ra, rb, encode_crbit(cr, CR_FU));
859 break;
860 case ordered:
861 isel(rt, rb, ra, encode_crbit(cr, CR_FU));
862 break;
863 case overflow:
864 isel(rt, ra, rb, encode_crbit(cr, CR_SO));
865 break;
866 case nooverflow:
867 isel(rt, rb, ra, encode_crbit(cr, CR_SO));
868 break;
869 default:
870 UNIMPLEMENTED();
871 }
872 }
873
835 void b(Condition cond, Label* L, CRegister cr = cr7, LKBit lk = LeaveLK) { 874 void b(Condition cond, Label* L, CRegister cr = cr7, LKBit lk = LeaveLK) {
836 if (cond == al) { 875 if (cond == al) {
837 b(L, lk); 876 b(L, lk);
838 return; 877 return;
839 } 878 }
840 879
841 if ((L->is_bound() && is_near(L, cond)) || !is_trampoline_emitted()) { 880 if ((L->is_bound() && is_near(L, cond)) || !is_trampoline_emitted()) {
842 bc_short(cond, L, cr, lk); 881 bc_short(cond, L, cr, lk);
843 return; 882 return;
844 } 883 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 RCBit r = LeaveRC); 939 RCBit r = LeaveRC);
901 940
902 void addc(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 941 void addc(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
903 RCBit r = LeaveRC); 942 RCBit r = LeaveRC);
904 943
905 void addze(Register dst, Register src1, OEBit o, RCBit r); 944 void addze(Register dst, Register src1, OEBit o, RCBit r);
906 945
907 void mullw(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 946 void mullw(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
908 RCBit r = LeaveRC); 947 RCBit r = LeaveRC);
909 948
910 void mulhw(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 949 void mulhw(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
911 RCBit r = LeaveRC); 950 void mulhwu(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
912 951
913 void divw(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 952 void divw(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
914 RCBit r = LeaveRC); 953 RCBit r = LeaveRC);
954 void divwu(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
955 RCBit r = LeaveRC);
915 956
916 void addi(Register dst, Register src, const Operand& imm); 957 void addi(Register dst, Register src, const Operand& imm);
917 void addis(Register dst, Register src, const Operand& imm); 958 void addis(Register dst, Register src, const Operand& imm);
918 void addic(Register dst, Register src, const Operand& imm); 959 void addic(Register dst, Register src, const Operand& imm);
919 960
920 void and_(Register dst, Register src1, Register src2, RCBit rc = LeaveRC); 961 void and_(Register dst, Register src1, Register src2, RCBit rc = LeaveRC);
921 void andc(Register dst, Register src1, Register src2, RCBit rc = LeaveRC); 962 void andc(Register dst, Register src1, Register src2, RCBit rc = LeaveRC);
922 void andi(Register ra, Register rs, const Operand& imm); 963 void andi(Register ra, Register rs, const Operand& imm);
923 void andis(Register ra, Register rs, const Operand& imm); 964 void andis(Register ra, Register rs, const Operand& imm);
924 void nor(Register dst, Register src1, Register src2, RCBit r = LeaveRC); 965 void nor(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
925 void notx(Register dst, Register src, RCBit r = LeaveRC); 966 void notx(Register dst, Register src, RCBit r = LeaveRC);
926 void ori(Register dst, Register src, const Operand& imm); 967 void ori(Register dst, Register src, const Operand& imm);
927 void oris(Register dst, Register src, const Operand& imm); 968 void oris(Register dst, Register src, const Operand& imm);
928 void orx(Register dst, Register src1, Register src2, RCBit rc = LeaveRC); 969 void orx(Register dst, Register src1, Register src2, RCBit rc = LeaveRC);
970 void orc(Register dst, Register src1, Register src2, RCBit rc = LeaveRC);
929 void xori(Register dst, Register src, const Operand& imm); 971 void xori(Register dst, Register src, const Operand& imm);
930 void xoris(Register ra, Register rs, const Operand& imm); 972 void xoris(Register ra, Register rs, const Operand& imm);
931 void xor_(Register dst, Register src1, Register src2, RCBit rc = LeaveRC); 973 void xor_(Register dst, Register src1, Register src2, RCBit rc = LeaveRC);
932 void cmpi(Register src1, const Operand& src2, CRegister cr = cr7); 974 void cmpi(Register src1, const Operand& src2, CRegister cr = cr7);
933 void cmpli(Register src1, const Operand& src2, CRegister cr = cr7); 975 void cmpli(Register src1, const Operand& src2, CRegister cr = cr7);
934 void cmpwi(Register src1, const Operand& src2, CRegister cr = cr7); 976 void cmpwi(Register src1, const Operand& src2, CRegister cr = cr7);
935 void cmplwi(Register src1, const Operand& src2, CRegister cr = cr7); 977 void cmplwi(Register src1, const Operand& src2, CRegister cr = cr7);
936 void li(Register dst, const Operand& src); 978 void li(Register dst, const Operand& src);
937 void lis(Register dst, const Operand& imm); 979 void lis(Register dst, const Operand& imm);
938 void mr(Register dst, Register src); 980 void mr(Register dst, Register src);
939 981
940 void lbz(Register dst, const MemOperand& src); 982 void lbz(Register dst, const MemOperand& src);
941 void lbzx(Register dst, const MemOperand& src); 983 void lbzx(Register dst, const MemOperand& src);
942 void lbzux(Register dst, const MemOperand& src); 984 void lbzux(Register dst, const MemOperand& src);
943 void lhz(Register dst, const MemOperand& src); 985 void lhz(Register dst, const MemOperand& src);
944 void lhzx(Register dst, const MemOperand& src); 986 void lhzx(Register dst, const MemOperand& src);
945 void lhzux(Register dst, const MemOperand& src); 987 void lhzux(Register dst, const MemOperand& src);
988 void lha(Register dst, const MemOperand& src);
989 void lhax(Register dst, const MemOperand& src);
946 void lwz(Register dst, const MemOperand& src); 990 void lwz(Register dst, const MemOperand& src);
947 void lwzu(Register dst, const MemOperand& src); 991 void lwzu(Register dst, const MemOperand& src);
948 void lwzx(Register dst, const MemOperand& src); 992 void lwzx(Register dst, const MemOperand& src);
949 void lwzux(Register dst, const MemOperand& src); 993 void lwzux(Register dst, const MemOperand& src);
950 void lwa(Register dst, const MemOperand& src); 994 void lwa(Register dst, const MemOperand& src);
995 void lwax(Register dst, const MemOperand& src);
951 void stb(Register dst, const MemOperand& src); 996 void stb(Register dst, const MemOperand& src);
952 void stbx(Register dst, const MemOperand& src); 997 void stbx(Register dst, const MemOperand& src);
953 void stbux(Register dst, const MemOperand& src); 998 void stbux(Register dst, const MemOperand& src);
954 void sth(Register dst, const MemOperand& src); 999 void sth(Register dst, const MemOperand& src);
955 void sthx(Register dst, const MemOperand& src); 1000 void sthx(Register dst, const MemOperand& src);
956 void sthux(Register dst, const MemOperand& src); 1001 void sthux(Register dst, const MemOperand& src);
957 void stw(Register dst, const MemOperand& src); 1002 void stw(Register dst, const MemOperand& src);
958 void stwu(Register dst, const MemOperand& src); 1003 void stwu(Register dst, const MemOperand& src);
959 void stwx(Register rs, const MemOperand& src); 1004 void stwx(Register rs, const MemOperand& src);
960 void stwux(Register rs, const MemOperand& src); 1005 void stwux(Register rs, const MemOperand& src);
961 1006
962 void extsb(Register rs, Register ra, RCBit r = LeaveRC); 1007 void extsb(Register rs, Register ra, RCBit r = LeaveRC);
963 void extsh(Register rs, Register ra, RCBit r = LeaveRC); 1008 void extsh(Register rs, Register ra, RCBit r = LeaveRC);
1009 void extsw(Register rs, Register ra, RCBit r = LeaveRC);
964 1010
965 void neg(Register rt, Register ra, OEBit o = LeaveOE, RCBit c = LeaveRC); 1011 void neg(Register rt, Register ra, OEBit o = LeaveOE, RCBit c = LeaveRC);
966 1012
967 #if V8_TARGET_ARCH_PPC64 1013 #if V8_TARGET_ARCH_PPC64
968 void ld(Register rd, const MemOperand& src); 1014 void ld(Register rd, const MemOperand& src);
969 void ldx(Register rd, const MemOperand& src); 1015 void ldx(Register rd, const MemOperand& src);
970 void ldu(Register rd, const MemOperand& src); 1016 void ldu(Register rd, const MemOperand& src);
971 void ldux(Register rd, const MemOperand& src); 1017 void ldux(Register rd, const MemOperand& src);
972 void std(Register rs, const MemOperand& src); 1018 void std(Register rs, const MemOperand& src);
973 void stdx(Register rs, const MemOperand& src); 1019 void stdx(Register rs, const MemOperand& src);
(...skipping 11 matching lines...) Expand all
985 void clrldi(Register dst, Register src, const Operand& val, 1031 void clrldi(Register dst, Register src, const Operand& val,
986 RCBit rc = LeaveRC); 1032 RCBit rc = LeaveRC);
987 void sradi(Register ra, Register rs, int sh, RCBit r = LeaveRC); 1033 void sradi(Register ra, Register rs, int sh, RCBit r = LeaveRC);
988 void srd(Register dst, Register src1, Register src2, RCBit r = LeaveRC); 1034 void srd(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
989 void sld(Register dst, Register src1, Register src2, RCBit r = LeaveRC); 1035 void sld(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
990 void srad(Register dst, Register src1, Register src2, RCBit r = LeaveRC); 1036 void srad(Register dst, Register src1, Register src2, RCBit r = LeaveRC);
991 void rotld(Register ra, Register rs, Register rb, RCBit r = LeaveRC); 1037 void rotld(Register ra, Register rs, Register rb, RCBit r = LeaveRC);
992 void rotldi(Register ra, Register rs, int sh, RCBit r = LeaveRC); 1038 void rotldi(Register ra, Register rs, int sh, RCBit r = LeaveRC);
993 void rotrdi(Register ra, Register rs, int sh, RCBit r = LeaveRC); 1039 void rotrdi(Register ra, Register rs, int sh, RCBit r = LeaveRC);
994 void cntlzd_(Register dst, Register src, RCBit rc = LeaveRC); 1040 void cntlzd_(Register dst, Register src, RCBit rc = LeaveRC);
995 void extsw(Register rs, Register ra, RCBit r = LeaveRC);
996 void mulld(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 1041 void mulld(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
997 RCBit r = LeaveRC); 1042 RCBit r = LeaveRC);
998 void divd(Register dst, Register src1, Register src2, OEBit o = LeaveOE, 1043 void divd(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
999 RCBit r = LeaveRC); 1044 RCBit r = LeaveRC);
1045 void divdu(Register dst, Register src1, Register src2, OEBit o = LeaveOE,
1046 RCBit r = LeaveRC);
1000 #endif 1047 #endif
1001 1048
1002 void rlwinm(Register ra, Register rs, int sh, int mb, int me, 1049 void rlwinm(Register ra, Register rs, int sh, int mb, int me,
1003 RCBit rc = LeaveRC); 1050 RCBit rc = LeaveRC);
1004 void rlwimi(Register ra, Register rs, int sh, int mb, int me, 1051 void rlwimi(Register ra, Register rs, int sh, int mb, int me,
1005 RCBit rc = LeaveRC); 1052 RCBit rc = LeaveRC);
1006 void rlwnm(Register ra, Register rs, Register rb, int mb, int me, 1053 void rlwnm(Register ra, Register rs, Register rb, int mb, int me,
1007 RCBit rc = LeaveRC); 1054 RCBit rc = LeaveRC);
1008 void slwi(Register dst, Register src, const Operand& val, RCBit rc = LeaveRC); 1055 void slwi(Register dst, Register src, const Operand& val, RCBit rc = LeaveRC);
1009 void srwi(Register dst, Register src, const Operand& val, RCBit rc = LeaveRC); 1056 void srwi(Register dst, Register src, const Operand& val, RCBit rc = LeaveRC);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 void mcrfs(int bf, int bfa); 1099 void mcrfs(int bf, int bfa);
1053 void mfcr(Register dst); 1100 void mfcr(Register dst);
1054 #if V8_TARGET_ARCH_PPC64 1101 #if V8_TARGET_ARCH_PPC64
1055 void mffprd(Register dst, DoubleRegister src); 1102 void mffprd(Register dst, DoubleRegister src);
1056 void mffprwz(Register dst, DoubleRegister src); 1103 void mffprwz(Register dst, DoubleRegister src);
1057 void mtfprd(DoubleRegister dst, Register src); 1104 void mtfprd(DoubleRegister dst, Register src);
1058 void mtfprwz(DoubleRegister dst, Register src); 1105 void mtfprwz(DoubleRegister dst, Register src);
1059 void mtfprwa(DoubleRegister dst, Register src); 1106 void mtfprwa(DoubleRegister dst, Register src);
1060 #endif 1107 #endif
1061 1108
1062 void fake_asm(enum FAKE_OPCODE_T fopcode);
1063 void marker_asm(int mcode);
1064 void function_descriptor(); 1109 void function_descriptor();
1065 1110
1066 // Exception-generating instructions and debugging support 1111 // Exception-generating instructions and debugging support
1067 void stop(const char* msg, Condition cond = al, 1112 void stop(const char* msg, Condition cond = al,
1068 int32_t code = kDefaultStopCode, CRegister cr = cr7); 1113 int32_t code = kDefaultStopCode, CRegister cr = cr7);
1069 1114
1070 void bkpt(uint32_t imm16); // v5 and above 1115 void bkpt(uint32_t imm16); // v5 and above
1071 1116
1072 // Informational messages when simulating
1073 void info(const char* msg, Condition cond = al,
1074 int32_t code = kDefaultStopCode, CRegister cr = cr7);
1075
1076 void dcbf(Register ra, Register rb); 1117 void dcbf(Register ra, Register rb);
1077 void sync(); 1118 void sync();
1078 void lwsync(); 1119 void lwsync();
1079 void icbi(Register ra, Register rb); 1120 void icbi(Register ra, Register rb);
1080 void isync(); 1121 void isync();
1081 1122
1082 // Support for floating point 1123 // Support for floating point
1083 void lfd(const DoubleRegister frt, const MemOperand& src); 1124 void lfd(const DoubleRegister frt, const MemOperand& src);
1084 void lfdu(const DoubleRegister frt, const MemOperand& src); 1125 void lfdu(const DoubleRegister frt, const MemOperand& src);
1085 void lfdx(const DoubleRegister frt, const MemOperand& src); 1126 void lfdx(const DoubleRegister frt, const MemOperand& src);
(...skipping 18 matching lines...) Expand all
1104 void fdiv(const DoubleRegister frt, const DoubleRegister fra, 1145 void fdiv(const DoubleRegister frt, const DoubleRegister fra,
1105 const DoubleRegister frb, RCBit rc = LeaveRC); 1146 const DoubleRegister frb, RCBit rc = LeaveRC);
1106 void fmul(const DoubleRegister frt, const DoubleRegister fra, 1147 void fmul(const DoubleRegister frt, const DoubleRegister fra,
1107 const DoubleRegister frc, RCBit rc = LeaveRC); 1148 const DoubleRegister frc, RCBit rc = LeaveRC);
1108 void fcmpu(const DoubleRegister fra, const DoubleRegister frb, 1149 void fcmpu(const DoubleRegister fra, const DoubleRegister frb,
1109 CRegister cr = cr7); 1150 CRegister cr = cr7);
1110 void fmr(const DoubleRegister frt, const DoubleRegister frb, 1151 void fmr(const DoubleRegister frt, const DoubleRegister frb,
1111 RCBit rc = LeaveRC); 1152 RCBit rc = LeaveRC);
1112 void fctiwz(const DoubleRegister frt, const DoubleRegister frb); 1153 void fctiwz(const DoubleRegister frt, const DoubleRegister frb);
1113 void fctiw(const DoubleRegister frt, const DoubleRegister frb); 1154 void fctiw(const DoubleRegister frt, const DoubleRegister frb);
1114 void frim(const DoubleRegister frt, const DoubleRegister frb); 1155 void frin(const DoubleRegister frt, const DoubleRegister frb,
1156 RCBit rc = LeaveRC);
1157 void friz(const DoubleRegister frt, const DoubleRegister frb,
1158 RCBit rc = LeaveRC);
1159 void frip(const DoubleRegister frt, const DoubleRegister frb,
1160 RCBit rc = LeaveRC);
1161 void frim(const DoubleRegister frt, const DoubleRegister frb,
1162 RCBit rc = LeaveRC);
1115 void frsp(const DoubleRegister frt, const DoubleRegister frb, 1163 void frsp(const DoubleRegister frt, const DoubleRegister frb,
1116 RCBit rc = LeaveRC); 1164 RCBit rc = LeaveRC);
1117 void fcfid(const DoubleRegister frt, const DoubleRegister frb, 1165 void fcfid(const DoubleRegister frt, const DoubleRegister frb,
1118 RCBit rc = LeaveRC); 1166 RCBit rc = LeaveRC);
1119 void fctid(const DoubleRegister frt, const DoubleRegister frb, 1167 void fctid(const DoubleRegister frt, const DoubleRegister frb,
1120 RCBit rc = LeaveRC); 1168 RCBit rc = LeaveRC);
1121 void fctidz(const DoubleRegister frt, const DoubleRegister frb, 1169 void fctidz(const DoubleRegister frt, const DoubleRegister frb,
1122 RCBit rc = LeaveRC); 1170 RCBit rc = LeaveRC);
1123 void fsel(const DoubleRegister frt, const DoubleRegister fra, 1171 void fsel(const DoubleRegister frt, const DoubleRegister fra,
1124 const DoubleRegister frc, const DoubleRegister frb, 1172 const DoubleRegister frc, const DoubleRegister frb,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 // DCHECK(!recorded_ast_id_.IsNone()); 1274 // DCHECK(!recorded_ast_id_.IsNone());
1227 return recorded_ast_id_; 1275 return recorded_ast_id_;
1228 } 1276 }
1229 1277
1230 void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); } 1278 void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); }
1231 1279
1232 // Record a comment relocation entry that can be used by a disassembler. 1280 // Record a comment relocation entry that can be used by a disassembler.
1233 // Use --code-comments to enable. 1281 // Use --code-comments to enable.
1234 void RecordComment(const char* msg); 1282 void RecordComment(const char* msg);
1235 1283
1284 // Record a deoptimization reason that can be used by a log or cpu profiler.
1285 // Use --trace-deopt to enable.
1286 void RecordDeoptReason(const int reason, const int raw_position);
1287
1236 // Writes a single byte or word of data in the code stream. Used 1288 // Writes a single byte or word of data in the code stream. Used
1237 // for inline tables, e.g., jump-tables. 1289 // for inline tables, e.g., jump-tables.
1238 void db(uint8_t data); 1290 void db(uint8_t data);
1239 void dd(uint32_t data); 1291 void dd(uint32_t data);
1240 void emit_ptr(uintptr_t data); 1292 void emit_ptr(uintptr_t data);
1241 1293
1242 PositionsRecorder* positions_recorder() { return &positions_recorder_; } 1294 PositionsRecorder* positions_recorder() { return &positions_recorder_; }
1243 1295
1244 // Read/patch instructions 1296 // Read/patch instructions
1245 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } 1297 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 void EndBlockTrampolinePool() { trampoline_pool_blocked_nesting_--; } 1411 void EndBlockTrampolinePool() { trampoline_pool_blocked_nesting_--; }
1360 1412
1361 bool is_trampoline_pool_blocked() const { 1413 bool is_trampoline_pool_blocked() const {
1362 return trampoline_pool_blocked_nesting_ > 0; 1414 return trampoline_pool_blocked_nesting_ > 0;
1363 } 1415 }
1364 1416
1365 bool has_exception() const { return internal_trampoline_exception_; } 1417 bool has_exception() const { return internal_trampoline_exception_; }
1366 1418
1367 bool is_trampoline_emitted() const { return trampoline_emitted_; } 1419 bool is_trampoline_emitted() const { return trampoline_emitted_; }
1368 1420
1369 #if V8_OOL_CONSTANT_POOL
1370 void set_constant_pool_available(bool available) {
1371 constant_pool_available_ = available;
1372 }
1373 #endif
1374
1375 private: 1421 private:
1376 // Code generation 1422 // Code generation
1377 // The relocation writer's position is at least kGap bytes below the end of 1423 // The relocation writer's position is at least kGap bytes below the end of
1378 // the generated instructions. This is so that multi-instruction sequences do 1424 // the generated instructions. This is so that multi-instruction sequences do
1379 // not have to check for overflow. The same is true for writes of large 1425 // not have to check for overflow. The same is true for writes of large
1380 // relocation info entries. 1426 // relocation info entries.
1381 static const int kGap = 32; 1427 static const int kGap = 32;
1382 1428
1383 // Repeated checking whether the trampoline pool should be emitted is rather 1429 // Repeated checking whether the trampoline pool should be emitted is rather
1384 // expensive. By default we only check again once a number of instructions 1430 // expensive. By default we only check again once a number of instructions
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 1530
1485 1531
1486 class EnsureSpace BASE_EMBEDDED { 1532 class EnsureSpace BASE_EMBEDDED {
1487 public: 1533 public:
1488 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } 1534 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); }
1489 }; 1535 };
1490 } 1536 }
1491 } // namespace v8::internal 1537 } // namespace v8::internal
1492 1538
1493 #endif // V8_PPC_ASSEMBLER_PPC_H_ 1539 #endif // V8_PPC_ASSEMBLER_PPC_H_
OLDNEW
« no previous file with comments | « src/ic/ppc/stub-cache-ppc.cc ('k') | src/ppc/assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698