~ubuntu-branches/ubuntu/vivid/qemu/vivid

« back to all changes in this revision

Viewing changes to tcg/tcg.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-25 22:31:43 UTC
  • mfrom: (1.8.5)
  • Revision ID: package-import@ubuntu.com-20140225223143-odhqxfc60wxrjl15
Tags: 2.0.0~rc1+dfsg-0ubuntu1
* Merge 2.0.0-rc1
* debian/rules: consolidate ppc filter entries.
* Move qemu-system-arch64 into qemu-system-arm
* debian/patches/define-trusty-machine-type.patch: define a trusty machine
  type, currently the same as pc-i440fx-2.0, to put is in a better position
  to enable live migrations from trusty onward.  (LP: #1294823)
* debian/control: build-dep on libfdt >= 1.4.0  (LP: #1295072)
* Merge latest upstream git to commit dc9528f
* Debian/rules:
  - remove -enable-uname-release=2.6.32
  - don't make the aarch64 target Ubuntu-specific.
* Remove patches which are now upstream:
  - fix-smb-security-share.patch
  - slirp-smb-redirect-port-445-too.patch 
  - linux-user-Implement-sendmmsg-syscall.patch (better version is upstream)
  - signal-added-a-wrapper-for-sigprocmask-function.patch
  - ubuntu/signal-sigsegv-protection-on-do_sigprocmask.patch
  - ubuntu/Don-t-block-SIGSEGV-at-more-places.patch
  - ubuntu/ppc-force-cpu-threads-count-to-be-power-of-2.patch
* add link for /usr/share/qemu/bios-256k.bin
* Remove all linaro patches.
* Remove all arm64/ patches.  Many but not all are upstream.
* Remove CVE-2013-4377.patch which is upstream.
* debian/control-in: don't make qemu-system-aarch64 ubuntu-specific

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include "qemu/host-utils.h"
42
42
#include "qemu/timer.h"
43
43
 
44
 
/* Note: the long term plan is to reduce the dependancies on the QEMU
 
44
/* Note: the long term plan is to reduce the dependencies on the QEMU
45
45
   CPU definitions. Currently they are used for qemu_ld/st
46
46
   instructions */
47
47
#define NO_CPU_IO_DEFS
357
357
 
358
358
void tcg_func_start(TCGContext *s)
359
359
{
360
 
    int i;
361
360
    tcg_pool_reset(s);
362
361
    s->nb_temps = s->nb_globals;
363
 
    for(i = 0; i < (TCG_TYPE_COUNT * 2); i++)
364
 
        s->first_free_temp[i] = -1;
 
362
 
 
363
    /* No temps have been previously allocated for size or locality.  */
 
364
    memset(s->free_temps, 0, sizeof(s->free_temps));
 
365
 
365
366
    s->labels = tcg_malloc(sizeof(TCGLabel) * TCG_MAX_LABELS);
366
367
    s->nb_labels = 0;
367
368
    s->current_frame_offset = s->frame_start;
503
504
    TCGTemp *ts;
504
505
    int idx, k;
505
506
 
506
 
    k = type;
507
 
    if (temp_local)
508
 
        k += TCG_TYPE_COUNT;
509
 
    idx = s->first_free_temp[k];
510
 
    if (idx != -1) {
511
 
        /* There is already an available temp with the
512
 
           right type */
 
507
    k = type + (temp_local ? TCG_TYPE_COUNT : 0);
 
508
    idx = find_first_bit(s->free_temps[k].l, TCG_MAX_TEMPS);
 
509
    if (idx < TCG_MAX_TEMPS) {
 
510
        /* There is already an available temp with the right type.  */
 
511
        clear_bit(idx, s->free_temps[k].l);
 
512
 
513
513
        ts = &s->temps[idx];
514
 
        s->first_free_temp[k] = ts->next_free_temp;
515
514
        ts->temp_allocated = 1;
 
515
        assert(ts->base_type == type);
516
516
        assert(ts->temp_local == temp_local);
517
517
    } else {
518
518
        idx = s->nb_temps;
526
526
            ts->temp_local = temp_local;
527
527
            ts->name = NULL;
528
528
            ts++;
529
 
            ts->base_type = TCG_TYPE_I32;
 
529
            ts->base_type = type;
530
530
            ts->type = TCG_TYPE_I32;
531
531
            ts->temp_allocated = 1;
532
532
            ts->temp_local = temp_local;
568
568
    return MAKE_TCGV_I64(idx);
569
569
}
570
570
 
571
 
static inline void tcg_temp_free_internal(int idx)
 
571
static void tcg_temp_free_internal(int idx)
572
572
{
573
573
    TCGContext *s = &tcg_ctx;
574
574
    TCGTemp *ts;
585
585
    ts = &s->temps[idx];
586
586
    assert(ts->temp_allocated != 0);
587
587
    ts->temp_allocated = 0;
588
 
    k = ts->base_type;
589
 
    if (ts->temp_local)
590
 
        k += TCG_TYPE_COUNT;
591
 
    ts->next_free_temp = s->first_free_temp[k];
592
 
    s->first_free_temp[k] = idx;
 
588
 
 
589
    k = ts->base_type + (ts->temp_local ? TCG_TYPE_COUNT : 0);
 
590
    set_bit(idx, s->free_temps[k].l);
593
591
}
594
592
 
595
593
void tcg_temp_free_i32(TCGv_i32 arg)