aboutsummaryrefslogtreecommitdiffstats
path: root/exec-all.h
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-05-10 18:48:35 -0700
committerDavid 'Digit' Turner <digit@android.com>2010-05-11 17:10:19 -0700
commit2910f183ddd5286911bc1e3499ea93cb57de8b75 (patch)
tree43cfd4b9a6697496732722ff7f2fb66d5782597c /exec-all.h
parent0119362f0d74ca74f3ea743f6e0e527a9edcc474 (diff)
downloadexternal_qemu-2910f183ddd5286911bc1e3499ea93cb57de8b75.zip
external_qemu-2910f183ddd5286911bc1e3499ea93cb57de8b75.tar.gz
external_qemu-2910f183ddd5286911bc1e3499ea93cb57de8b75.tar.bz2
Upstream: Misc integration - includes qobject.h and related sources
Change-Id: Idfa93ab5c67c95a3bc1869eeaf3a84a75fe24cd6
Diffstat (limited to 'exec-all.h')
-rw-r--r--exec-all.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/exec-all.h b/exec-all.h
index c686554..df818ba 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -14,8 +14,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _EXEC_ALL_H_
@@ -35,17 +34,17 @@
typedef struct TranslationBlock TranslationBlock;
/* XXX: make safe guess about sizes */
-#define MAX_OP_PER_INSTR 64
+#define MAX_OP_PER_INSTR 96
/* A Call op needs up to 6 + 2N parameters (N = number of arguments). */
#define MAX_OPC_PARAM 10
#define OPC_BUF_SIZE 2048
#define OPC_MAX_SIZE (OPC_BUF_SIZE - MAX_OP_PER_INSTR)
/* Maximum size a TCG op can expand to. This is complicated because a
- single op may require several host instructions and regirster reloads.
- For now take a wild guess at 128 bytes, which should allow at least
+ single op may require several host instructions and register reloads.
+ For now take a wild guess at 192 bytes, which should allow at least
a couple of fixup instructions per argument. */
-#define TCG_MAX_OP_SIZE 128
+#define TCG_MAX_OP_SIZE 192
#define OPPARAM_BUF_SIZE (OPC_BUF_SIZE * MAX_OPC_PARAM)
@@ -115,10 +114,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr,
#define CODE_GEN_AVG_BLOCK_SIZE 64
#endif
-#if defined(_ARCH_PPC) || defined(__x86_64__) || defined(__arm__)
-#define USE_DIRECT_JUMP
-#endif
-#if defined(__i386__) && !defined(_WIN32)
+#if defined(_ARCH_PPC) || defined(__x86_64__) || defined(__arm__) || defined(__i386__)
#define USE_DIRECT_JUMP
#endif
@@ -283,7 +279,9 @@ static inline void tb_set_jmp_target1(unsigned long jmp_addr, unsigned long addr
#endif
/* we could use a ldr pc, [pc, #-4] kind of branch and avoid the flush */
- *(uint32_t *)jmp_addr |= ((addr - (jmp_addr + 8)) >> 2) & 0xffffff;
+ *(uint32_t *)jmp_addr =
+ (*(uint32_t *)jmp_addr & ~0xffffff)
+ | (((addr - (jmp_addr + 8)) >> 2) & 0xffffff);
#if QEMU_GNUC_PREREQ(4, 1)
__clear_cache((char *) jmp_addr, (char *) jmp_addr + 4);