From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7637 invoked by alias); 30 Jun 2016 12:41:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 7624 invoked by uid 89); 30 Jun 2016 12:41:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1485 X-HELO: mail-vk0-f41.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lMZHKyNgYyjkvelt9QGoWU1UpPn1DVF4K21JxrpQgC8=; b=Id7TggDuTWmBKBF1i9DiPP//a6HBeXex19D85IsHlzgseWsFR2PMZLYu+XZ8IfdT4X N/kLSSLbw7KJ+2Au0XXBSP8VGEYVwlfsF9Ms+uYQa0srucwqOmXakIjIKu7Izc+IZ90S Pi5cfbx7qWXutpVncHz0ikJjU1cunkNLAdc53zLrKQQb36prpfhhx4WeKXCs3jSLAyZN tNHVCTWOT3HKqrw5PPewz3UrDloosvLsdP0Q/C5J5gocoyJOT1SNUgjhz5Anlj7HkUag BdoxtwurKfunMj41V1nx0FC75aIb8F2c/KtvD9SpIG4LcaINJ8258V1TNe3qfozMLLfJ 20vA== X-Gm-Message-State: ALyK8tLreho7cgaIaL0PHT8xpIxwg3y1Sm6z2r1BpRxLNCqTQjkJ0MCO5eBiAiaCj+kSCu79ln3sjoOIkQ889A== X-Received: by 10.176.3.1 with SMTP id 1mr5646266uat.139.1467290467786; Thu, 30 Jun 2016 05:41:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <57560F10.4040907@redhat.com> From: Andrew Senkevich Date: Thu, 30 Jun 2016 12:41:00 -0000 Message-ID: Subject: Re: [PATCH x86-64][BZ #20024] Fixed vector sincos/sincosf ABI To: Joseph Myers Cc: "Carlos O'Donell" , libc-alpha Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-06/txt/msg01282.txt.bz2 2016-06-30 0:59 GMT+03:00 Joseph Myers : > On Thu, 23 Jun 2016, Andrew Senkevich wrote: > >> +#define VECTOR_WRAPPER_fFF_2(scalar_func, vector_func) \ >> +extern void vector_func (VEC_TYPE, VEC_INT_TYPE, VEC_INT_TYPE); \ >> +void scalar_func (FLOAT x, FLOAT * r, FLOAT * r1) \ >> +{ \ >> + int i; \ >> + FLOAT r_loc[VEC_LEN], r1_loc[VEC_LEN]; \ >> + VEC_TYPE mx; \ >> + VEC_INT_TYPE mr, mr1; \ >> + INIT_VEC_LOOP (mx, x, VEC_LEN); \ >> + INIT_VEC_PTRS_LOOP (((FLOAT **) &mr), r_loc, VEC_LEN); \ >> + INIT_VEC_PTRS_LOOP (((FLOAT **) &mr1), r1_loc, VEC_LEN); \ >> + vector_func (mx, mr, mr1); \ >> + char *mr_ptr = (char *) &mr; \ >> + char *mr1_ptr = (char *) &mr1; \ >> + TEST_VEC_LOOP (*((FLOAT **) mr_ptr), VEC_LEN); \ >> + TEST_VEC_LOOP (*((FLOAT **) mr1_ptr), VEC_LEN); \ >> + *r = *((FLOAT **) mr_ptr)[0]; \ >> + *r1 = *((FLOAT **) mr1_ptr)[0]; \ > > I still think this is much more complicated than necessary. > > Rather than having variables mr_ptr and mr1_ptr at all, and having a load > of pointer casts, I'd expect you just to pass r_loc and r1_loc - the > arrays in which the results have been stored - directly to TEST_VEC_LOOP. > And then store the results in *r and *r1 taken from r_loc[0] and > r1_loc[0], without all the unnecessary indirection. Indeed, it can be simplified now. Is it Ok with that change for trunk as well as for 2.22 and 2.23 release branches? -- WBR, Andrew