qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 2/6] qemu fixes
@ 2008-11-28 10:31 Christoph Egger
  2008-11-28 11:44 ` [Qemu-devel] " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Egger @ 2008-11-28 10:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]


Hi,

This is a series of four patches which improve support
for qemu on NetBSD.

Attached patch fixes warnings in the i386 specific part.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

[-- Attachment #2: i386_qemu.diff --]
[-- Type: text/x-diff, Size: 1973 bytes --]

Index: target-i386/op_helper.c
===================================================================
--- target-i386/op_helper.c	(revision 5805)
+++ target-i386/op_helper.c	(working copy)
@@ -210,7 +210,7 @@
 /* XXX: merge with load_seg() */
 static void tss_load_seg(int seg_reg, int selector)
 {
-    uint32_t e1, e2;
+    uint32_t e1 = 0, e2 = 0;
     int rpl, dpl, cpl;
 
     if ((selector & 0xfffc) != 0) {
@@ -638,7 +638,7 @@
     target_ulong ptr, ssp;
     int type, dpl, selector, ss_dpl, cpl;
     int has_error_code, new_stack, shift;
-    uint32_t e1, e2, offset, ss, esp, ss_e1, ss_e2;
+    uint32_t e1, e2, offset, ss = 0, esp, ss_e1 = 0, ss_e2 = 0;
     uint32_t old_eip, sp_mask;
 
     has_error_code = 0;
@@ -2159,7 +2159,7 @@
                            int next_eip_addend)
 {
     int gate_cs, type;
-    uint32_t e1, e2, cpl, dpl, rpl, limit;
+    uint32_t e1 = 0, e2 = 0, cpl, dpl, rpl, limit;
     target_ulong next_eip;
 
     if ((new_cs & 0xfffc) == 0)
@@ -2275,8 +2275,8 @@
                             int shift, int next_eip_addend)
 {
     int new_stack, i;
-    uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
-    uint32_t ss, ss_e1, ss_e2, sp, type, ss_dpl, sp_mask;
+    uint32_t e1 = 0, e2 = 0, cpl, dpl, rpl, selector, offset, param_count;
+    uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask;
     uint32_t val, limit, old_sp_mask;
     target_ulong ssp, old_ssp, next_eip;
 
@@ -2552,7 +2552,7 @@
 {
     uint32_t new_cs, new_eflags, new_ss;
     uint32_t new_es, new_ds, new_fs, new_gs;
-    uint32_t e1, e2, ss_e1, ss_e2;
+    uint32_t e1 = 0, e2 = 0, ss_e1 = 0, ss_e2 = 0;
     int cpl, dpl, rpl, eflags_mask, iopl;
     target_ulong ssp, sp, new_eip, new_esp, sp_mask;
 
@@ -2753,7 +2753,7 @@
 void helper_iret_protected(int shift, int next_eip)
 {
     int tss_selector, type;
-    uint32_t e1, e2;
+    uint32_t e1 = 0, e2 = 0;
 
     /* specific case for TSS */
     if (env->eflags & NT_MASK) {

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Re: [PATCH 2/6] qemu fixes
@ 2008-11-28 12:01 Christoph Egger
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Egger @ 2008-11-28 12:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Jan Kiszka


On Friday 28 November 2008 12:44:33 you wrote:
> Christoph Egger wrote:
> > Hi,
> >
> > This is a series of four patches which improve support
> > for qemu on NetBSD.
> >
> > Attached patch fixes warnings in the i386 specific part.
> >
> > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
>
> Except for ss* in [copy, paste, sigh]...
>
> > @@ -2275,8 +2275,8 @@
> >                              int shift, int next_eip_addend)
> >  {
> >      int new_stack, i;
> > -    uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
> > -    uint32_t ss, ss_e1, ss_e2, sp, type, ss_dpl, sp_mask;
> > +    uint32_t e1 = 0, e2 = 0, cpl, dpl, rpl, selector, offset,
> > param_count; +    uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type,
> > ss_dpl, sp_mask; uint32_t val, limit, old_sp_mask;
> >      target_ulong ssp, old_ssp, next_eip;
>
> I have a better patch here that fixes the root of gcc's confusion:
> missing noreturn instrumentation. The detection of the initialization of
> ss* variables falls into the category "gcc isn't smart enough", and one
> may discuss if we should handle it or wait for gcc getting smarter. BTW,
> this patch is not BSD specific but gcc4 related.

Well, go ahead then.

> Nevertheless, warning reduction patches are generally welcome IMHO!

Nice to hear.

Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-28 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 10:31 [Qemu-devel] [PATCH 2/6] qemu fixes Christoph Egger
2008-11-28 11:44 ` [Qemu-devel] " Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2008-11-28 12:01 Christoph Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).